#include<stdio.h> #include<conio.h> void main() { int i,j; clrscr(); for(i=1;i<=5;i++) { for(j=1;j<=5;j++) if(i==1||i==5||j==1||j==5) printf("%3d",1); else if(i==2||i==4||j==2||j==4) printf("%3d",2); else printf("%3d",3); printf("\n"); } getch(); } |
Tuesday 9 August 2016
Program 1(Format 1) Using Nested for Loop
Posted by computersadda on 23:26:00 in Nested for Loop C-Programs (28 formats) | Comments : 0
Subscribe to:
Post Comments
(
Atom
)
Post a Comment