for loop | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

for loop

#include <stdio.h> int main() { int i, j, rows; printf("Enter number of rows: "); scanf("%d",&rows); for(i=rows; i>=1; --i) { for(j=1; j<=i; ++j) { printf("%d ",j); } printf("\n"); } return 0; output: 12345 1234 123 12 1 i want output like reciprocal 54321 5432 543 54 54 5 what should i do???with same procedure

17th Jun 2019, 11:30 AM
Aakash G
Aakash G - avatar
2 Answers
+ 4
A tips for you, the solution for your problem lies to your second for loop
17th Jun 2019, 11:58 AM
Leon lit
Leon lit - avatar
+ 1
Aakash G did you solve it ? If you still can't solve it let me know.
18th Jun 2019, 4:54 AM
Leon lit
Leon lit - avatar