Write a program that will display the following pattern, given the value of n and m.
Example : if n=4, and m=3, output.
****
****
****
1
Expert's answer
2015-08-27T02:40:01-0400
#include <iostream> using namespace std; int main(){ int n,m; cout<<"Please input n = "; cin>>n; cout<<"Please input m = "; cin>>m; int j=1; do{ for(int i=1;i<=n;i++) { cout<<"*"; if (i%n==0) cout<<endl; } j++; }while(j<=m); }
Numbers and figures are an essential part of our world, necessary for almost everything we do every day. As important…
APPROVED BY CLIENTS
"assignmentexpert.com" is professional group of people in Math subjects! They did assignments in very high level of mathematical modelling in the best quality. Thanks a lot
Comments
Leave a comment