This program is about print the pattern as square outline using For Loop
#include<stdio.h> int main() { int i,j,n; printf("\nEnter the value:"); scanf("%d",&n); for(i=1;i<=n;i++) { printf("\n"); for(j=1;j<=n;j++) { if(i==1||i==n||j==1||j==n) printf(" *"); else printf(" "); } } return 0; }To download raw file Click Here
Enter the value:5 * * * * * * * * * * * * * * * * * *
Learn All in Tamil © Designed & Developed By Tutor Joes | Privacy Policy | Terms & Conditions