#include <stdio.h> int sq(int x) { return x*x; } int main (void) { int i,j; for(i=1;i<=5;i++) { for(j=1;j<=2;j++) printf("%d ",sq(i)); if(i==j) { j=0; } } system("pause"); return 0; }
The output is given below:
1 1 4 4 9 9 16 16 25 25
c, c++ , java, oracle, database design, c tutorial, c++ tutorial, java tutorial, oracle tutorial, programming, make program easy, c programming, c advance program, java advance program
#include <stdio.h> int sq(int x) { return x*x; } int main (void) { int i,j; for(i=1;i<=5;i++) { for(j=1;j<=2;j++) printf("%d ",sq(i)); if(i==j) { j=0; } } system("pause"); return 0; }
1 1 4 4 9 9 16 16 25 25
All rights reserved||Using Deluxe Template By Klodian
0 comments:
Post a Comment