0

I don’t understand the concept

You need to make a program for a leaderboard. The program needs to output the numbers 1 to 9, each on a separate line, followed by a dot: 1. 2. 3. ... I tried it but I did not understand what was wrong.

3rd Jan 2022, 12:48 PM
Kirti (^~^)
Kirti (^~^)  - avatar
6 Respuestas
+ 2
Use docstrings *or* a normal string with \n – not both. Also, remove the white space in the string!
3rd Jan 2022, 1:03 PM
Lisa
Lisa - avatar
+ 1
Please link your code so we can help you! Without seeing the code, we can't know what the problem is
3rd Jan 2022, 12:54 PM
Lisa
Lisa - avatar
0
print("""1. \n2. \n3. \n4. \n5. \n6. \n7. \n8. \n9.""") I tried this out…I don’t know but something is wrong.
3rd Jan 2022, 1:00 PM
Kirti (^~^)
Kirti (^~^)  - avatar
0
Thank you!
3rd Jan 2022, 1:04 PM
Kirti (^~^)
Kirti (^~^)  - avatar
0
Post your code so we can see what went wrong. Okay.
3rd Jan 2022, 1:11 PM
Larry Bah
Larry Bah - avatar
0
#include<iostream> using namespace std; int main() { for(int i=1;i <=9;i++) { cout<<i<<"."<<endl; } return 0; }
5th Jan 2022, 6:58 AM
Muhammad Rizwan
Muhammad Rizwan - avatar