//PROGRAM TO PRINT THE BLANK RECTANGLE
/*MADE BT KRISHNA AGARAWAL*/
#include<iostream>
using namespace std;
int main()
{
int i,n,j;
cout<<"\nenter the number of lines\n";
cin>>n;
for(i=1;i<=n;i++)
{
for(j=1;j<=2*n;j++)
{
if(i==1||i==n||j==1||j==2*n)
cout<<"*";
else
cout<<" ";
}
cout<<endl;
}
return 0;
}
/*MADE BT KRISHNA AGARAWAL*/
#include<iostream>
using namespace std;
int main()
{
int i,n,j;
cout<<"\nenter the number of lines\n";
cin>>n;
for(i=1;i<=n;i++)
{
for(j=1;j<=2*n;j++)
{
if(i==1||i==n||j==1||j==2*n)
cout<<"*";
else
cout<<" ";
}
cout<<endl;
}
return 0;
}
No comments:
Post a Comment