Forwarded from Dagi
#include <iostream>
using namespace std;
int age = 21;
void add() {
cout << "Age: " << age << endl;
}
int main() {
add();
return 0;
}
Like this
using namespace std;
int age = 21;
void add() {
cout << "Age: " << age << endl;
}
int main() {
add();
return 0;
}
Like this
π4π€2π1
This one also possible
#include <iostream>
using namespace std;
int age = 21;
void add();
int main() {
add();
return 0;
}
void add() {
cout << "Age: " << age << endl;
}
Output :21
#include <iostream>
using namespace std;
int age = 21;
void add();
int main() {
add();
return 0;
}
void add() {
cout << "Age: " << age << endl;
}
Output :21
C++ Basics
I think gelts nw selezi enketel adel......
Fetachun atekeskesuπ yalegebachun negr Kale teykugn.....
π€·ββ3π1
Quiz:
Ehen display meyaderg codu tsafu.....
Ouput: \ (backslash symbol display adergut)
Ehen display meyaderg codu tsafu.....
Ouput: \ (backslash symbol display adergut)
Ehen ensera ena lezare yebekanal
Write the output of thisπ code?
#include <iostream>
using namespace std;
int main( ) {
int n = 4, k = 2;
cout<< ++n << endl;
cout<< n++ << endl;
cout<< n << endl;
cout<< --n << endl;
cout<< n << endl;
cout<< n--<< endl;
cout<< n + k << endl;
cout<< k << endl;
cout<< " n" << endl;
cout<< "\n" << endl;
cout<< " n * n = ";
cout<< n * n << endl;
cout<< 'n' << endl;
return 0;
}
Write the output of thisπ code?
#include <iostream>
using namespace std;
int main( ) {
int n = 4, k = 2;
cout<< ++n << endl;
cout<< n++ << endl;
cout<< n << endl;
cout<< --n << endl;
cout<< n << endl;
cout<< n--<< endl;
cout<< n + k << endl;
cout<< k << endl;
cout<< " n" << endl;
cout<< "\n" << endl;
cout<< " n * n = ";
cout<< n * n << endl;
cout<< 'n' << endl;
return 0;
}
π8π1
Lezare yebkan ezi gar.....kmr hulachunem amesegnalewπ
π₯3π1
C++ Basics
Ehen ensera ena lezare yebekanal Write the output of thisπ code? #include <iostream> using namespace std; int main( ) { int n = 4, k = 2; cout<< ++n << endl; cout<< n++ << endl; cout<< n << endl; cout<< --n << endl; cout<< n << endl; cout<< n--<< endl;β¦
5
5
6
5
5
5
6
2
n
\newline display yadergal
n * n = 16
n
5
6
5
5
5
6
2
n
\newline display yadergal
n * n = 16
n
π2π₯2
Ahun gena dorm gebaw ena yelel dekmognal bezi lay demo rehab legelegn nwπ
π6
Should I host a livestream today where we just talk about what we've seen so far?
π₯5
C++ Basics
Should I host a livestream today where we just talk about what we've seen so far?
Maybe we'll do it another day ποΈ. It's Sunday beqa, just chill adergu π. I feel like hule class eyalku I've been aschenkwchu π©. Kmr, don't stress yourself becha chill eyadergachu anbebu π
@ProgrammingWithFaith
β'DON'T STUDY HARD, STUDY SMART' π§ π! π―"
@ProgrammingWithFaith
π―11π1
1.
#include <iostream>
using namespace std;
int main() {
int numb1, numb2;
cout << "Please Enter Number 1:" << endl;
cin >> numb1;
cout << "Please Enter Number 2:" << endl;
cin >> numb2;
cout << "X + Y :" << numb1 + numb2 << endl;
if (numb2 != 0) {
cout << "X / Y :" << numb1 / numb2 << endl;
}
cout << "X * Y :" << numb1 * numb2 << endl;
cout << "X - Y :" << numb1 - numb2 << endl;
if (numb1 > numb2) {
cout << "Number " << numb1 << " is Greater than Number " << numb2 << endl;
} else if (numb1 < numb2) {
cout << "Number " << numb1 << " is Greater than Number " << numb2 << endl;
} else {
cout << "They are equal" << endl;
}
return 0;
}
π₯°5π4