To Print Rectangle Pattern through user in C++


Program:-

 #include<iostream.h>

#include<conio.h>

int main( )

{

int a , b , row , column;

court<<"Enter the number for row";

cin>>row;

cout<<"Enter the number for column";

cin>>column;

for(a=1;a<=row;a++)

{

for(b=1;b<=column;b++)

{

cout<<"*";

}

cout<<"\n";

}

getch( );

return 0;

}


To run:










Output:



No comments:

Post a Comment

theengineerschoice01@gmail.com