1.

Consider the following output and write down the code for the same. 2 4 4 6 6 6 8 8 8 8

Answer»

#include<iostream>

using namespace std; 

int main() 

int i,j;

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

{

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

cout<<i x 2<<''";

cout<<endl;

}

}



Discussion

No Comment Found

Related InterviewSolutions