Wishing you the best for students who have midterms tomorrow. Good luck. @ProgrammingWithFaith2018
β€2
If you have paid for the registration and it is still not approved, DM me @TechnerdGuy.
β€2
ππ C++ variables α₯αα΄α΅ declare α₯α initiate αα΅α¨α α₯αα½αααπ€·ββ
α ααααͺα« variable ααα΅ α°αααα ααα΅ α²αα α°αααα α«α°ααα α α°αααα«α½α αα΅α₯ α«ααα αα(value) α αααα α°α α΅ ααα«α¨α α΅αααα½α ααα’
π‘ Variable declaration
αα ααα΅ α°αααα©α(variable) ααα (declare) α²αα α°ααααα ααα΅α¨α΅ α₯α ααα α¨ααα½ααα α₯αα°αα¨α°αα αα
data type variable name ;
αα³α:-
1
Datatypeπ int variable nameπ age;
2
Int salary;
πα₯αα αα salaryα α αα αα ααα declare α α°α¨ααα ααα΅ ααα’
........loading
To register for the premium class of C++, π [@ProgrammingWithFaith_bot] π
α ααααͺα« variable ααα΅ α°αααα ααα΅ α²αα α°αααα α«α°ααα α α°αααα«α½α αα΅α₯ α«ααα αα(value) α αααα α°α α΅ ααα«α¨α α΅αααα½α ααα’
π‘ Variable declaration
αα ααα΅ α°αααα©α(variable) ααα (declare) α²αα α°ααααα ααα΅α¨α΅ α₯α ααα α¨ααα½ααα α₯αα°αα¨α°αα αα
data type variable name ;
αα³α:-
1
Datatypeπ int variable nameπ age;
2
Int salary;
πα₯αα αα salaryα α αα αα ααα declare α α°α¨ααα ααα΅ ααα’
........loading
To register for the premium class of C++, π [@ProgrammingWithFaith_bot] π
Telegram
Programming With Faith
Programming With Faith empowers individuals to learn programming with dedication, creativity, and strong values.
β€2
While you register, please send me the actual screenshot of the payment πΈπ³ and avoid sending anything irrelevant π«π.
@ProgrammingWithFaith2018
@ProgrammingWithFaith2018
β€2
To register for the premium class of C++, π [@ProgrammingWithFaith_bot] π
β€2
50 $ α«αα£ α α α€α°α°α₯ high referal α¨αααα α₯αα
π
https://t.me/earncraft_bot/app?startapp=MTg3NjEyMjAyMV8x
π
https://t.me/earncraft_bot/app?startapp=MTg3NjEyMjAyMV8x
β€2
Shape.pdf
322.1 KB
β€2
To register for the premium class of C++, π [@ProgrammingWithFaith_bot] π
β€1
Media is too big
VIEW IN TELEGRAM
β
Pattern Using Loop part one
*
* *
* * *
* * * *
To register for the premium class of C++, π [@ProgrammingWithFaith_bot] π
@ProgrammingWithFaith2018
*
* *
* * *
* * * *
To register for the premium class of C++, π [@ProgrammingWithFaith_bot] π
@ProgrammingWithFaith2018
β€2
β€5π2π₯1π1
C++ Basic 2018 (Batch-2)
Should I post the Entrepreneurship Business Plan assignment? πβ¨ @ProgrammingWithFaith2018
I will post it, but you need to share this channel with other students. We need to reach 750 subscribers first.
@ProgrammingWithFaith2018
@ProgrammingWithFaith2018
β€2
β€4
C++ Basic 2018 (Batch-2)
Photo
using namespace std;
int main() {
char pressAletter;
cout << "Press any character" << endl;
cin >> pressAletter;
switch (pressAletter) {
case 'A':{
int f = 3, g = 4, h, k;
h = (2 * 34/2 + (g++)) - 4 * f+(++f) + 4 / (++g);
k = ++f + g++;
cout << "The value of f is: " << f << endl;
cout << "The value of g is: " << g << endl;
cout << "The value of h is: " << h << endl;
cout << "The value of k is: " << k << endl;
break;}
case 'B':{
int num = 5, i = 30;
do {
num*=4;
i++;
} while (i <= 20);
cout << "The value of a number is: " << num << endl;
break;}
default:
cout << "You do not have this option" << endl;
}
return 0;
}
When we press case "A", it will be executed. Let us compute this:
int f = 3, g = 4, h, k;
h = (2 * 34 / 2 + (g++)) - 4 * f + (++f) + 4 / (++g);
h = (2 * 34 / 2 + 4) - 4 * f + (++f) + 4 / (++g);
h = (38) - (4 * f) + (++f) + (4 / (++g));
h = (38) - 12 + (++f) + 4 / (++g);
h = (38) - 12 + 4 + 4 / 5; // 0.8, but the data type is integer, so it will be 0.
h = (38) - 12 + 4 + 0;
h = 30 - 8 + 0;
h = 30;
k = ++f + g++; // Here, the value of f will increment by one because it is pre-increment: f = 4 + 1 = 5. However, the value of g remains 6 because in the previous line it was incremented twice (once pre-increment and once post-increment), making it 6. Here it is still 6, and after this operation, it will become 7.
k = 5 + 6 = 11.
So finally: h = 30, k = 11, f = 5, g = 7.
When we press B, case "B" will be executed. Let us compute it:
int num = 5, i = 30;
do {
num *= 4;
i++;
} while (i <= 20);
cout << "The value of a number is: " << num << endl;
So, it is a do-while loop; it will enter the loop. num = 5 * 4 = 20; then i will be 31. The check if 31 <= 20 is false, so it will terminate the loop and output: The value of a number is 20.
When we press neither A nor B the default part will be executed "You do not have this option"
1. When we press A, what will be the output of lines 14 and 15?
β A (5 & 7)
2. When we press A, what will be the output of lines 16 and 17?
β D (30 & 11)
3. When we press B, what will be the output of line 28?
β B (20)
4. Neither A nor B.
β D (none)
5. The data types of this program are character and integer.
β D (A & B)
6.β B(ROM)
@ProgrammingWithFaith2018
β€3