0

C++

I was trying to code for a multiplication table like from 1 to n number column wise guys I am not able to think a code for it I used two for loops but wasn't able to run that

16th Dec 2020, 2:10 PM
IT'S viky
IT'S viky - avatar
4 odpowiedzi
+ 9
Try by drawing a flow-chart for the same and if possible share your snippet.
16th Dec 2020, 2:22 PM
Aditya
Aditya - avatar
+ 8
I used one for loop.. I hope you are talking about this like range from 1-n Also as said by Ipang you can explore many such examples //Try this by pasting on code bites #include <iostream> using namespace std; int main() { int n; cout <<"enter a positive integer n :"<<"\n"; cin >> n; for (int a =1; a <= n; a++) { cout << a*n <<"\n"; } return 0; }
16th Dec 2020, 4:18 PM
Aditya
Aditya - avatar
+ 1
Try to search the Code Playground for examples and inspirations. Someone likely had thought or even done something along the same idea 👍
16th Dec 2020, 2:56 PM
Ipang
0
Hey I just want my output as column wise like 2-20 again from starting but my output is like in a single line Only https://code.sololearn.com/cVULgtMSN1uN/?ref=app
16th Dec 2020, 2:37 PM
IT'S viky
IT'S viky - avatar