This is my program it is doing same job as ur program but it s more efficient
then one u made.There is lack of indentation in code,code without indentation is much hard to understand.
#include "stdafx.h"
#include<iostream>
using namespace std;
void main()
{
int n,m;
for(n=1;n<=5;n++)
{
for(m=1;m<=5;m++)
if(n==1||m==1||n==5||m==5)
cout<<"*";
else
cout<<" ";
cout<<endl;
}
system("pause");
}
Bookmarks