1.

Consider the following output and write down the code for the same. 1 2 3 4 5 6 7 8 9 10

Answer»

#include<iostream>

using namespace std; 

int main() 

int ij,k=0;

for(i=1;i<5;i++)

{

for(j=1;j<=i;j++)

cout<<++k<<''";

cout<<endl;

}

}



Discussion

No Comment Found

Related InterviewSolutions