0

c++ coding

Please help me w this coding Create a program using FOR LOOP that will print these 1 2 3 4 5 6 7 8 9 10 20 30 40 50 60 70 80 90 100

17th Nov 2022, 3:58 AM
soupie
6 Antworten
+ 2
Giannis That may work, but pls avoid giving finished code as answer, because it makes the OP to skip the most important part of learning process. Always prefer giving hints for the OP to find the solution.
18th Nov 2022, 1:06 AM
Emerson Prado
Emerson Prado - avatar
+ 1
Let me see you code the 1 ~ 10 part. From there we'll move on. Is there input needed?
17th Nov 2022, 4:15 AM
Ipang
0
Have you tried something? Rather share your tryout code bit link to understand where the issue is ...
17th Nov 2022, 4:11 AM
Ipang
0
no i cant do it pls help me w coding
17th Nov 2022, 4:13 AM
soupie
0
#include <iostream> int main() { int input = 1; while (input <= 10) { std::cout << "\n" << input; input++; } }
17th Nov 2022, 4:40 AM
soupie
0
you just need 2 for loops. for (int a = 1; a < 10; a++) cout << a << endl; for (int a = 10; a <= 100; a += 10) cout << a << endl;
17th Nov 2022, 10:17 AM
Giannis
Giannis - avatar