65 563
Assignments Done
99,2%
Successfully Done
In October 2018

Answer to Question #15532 in C++ for ericka

Question #15532
write a program that will display the following pattern, given the value of n and m. example if n=4, and m= 3, output:
++++
++++
++++
Expert's answer
#include <iostream>
using namespace std;

int _tmain(int argc,
_TCHAR* argv[])
{
int n=0;
int m=0;
cout<<"Please enter n:
"<<endl;
cin>>n;
cout<<"Please enter m:
"<<endl;
cin>>m;
for (int i=0; i<m; i++){
for (int j=0;
j<n; j++){
cout<<"+";
}
cout<<endl;
}
return
0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions