Can any one help me to solve this. | Sololearn: Learn to code for FREE!


Can any one help me to solve this.

Give me source code for this. Output : 0 0 0 1 2 3 2 4 6 3 6 9 4 8 12

11/28/2021 2:33:15 PM

First Last

9 Answers

New Answer


You should show your attempt first. Hint: use a for loop and a while loop inside it. In the first line each element is increasing by 0, in the second each increasing by 1 and so on..


#include <stdio.h> int main() { for(int i=0; i<5; i++) printf("%d %d %d \n", i, i+i, i+2*i); return 0; }


Save your tryout code as new code bit in SoloLearn, and share its link in your question Description. That way ayone can check it, and suggest accordingly.


Pihu ( Not Active ) inside the last prinf statement add a newline character(\n).


for(int i=0; i<5; i++) printf("%d %d %d \n", i, i*2, i*3); // Keep learning & happy coding :D


I am try this but it is not working 😔


Here, try to understand it: int i=0,j=0,k=0; while(k<=12){ printf("%d %d %d\n",i,j,k); i+=1;j+=2;k+=3; } Good luck!



It is a loop from 0 to 4, the second number is the index * by 2 and the third by 3.. So find the print fumction to print 3 numbers; i, i*2, i*3