hello all; i\'m having a problem with my output. the program that i\'m writingis
ID: 3617081 • Letter: H
Question
hello all;i'm having a problem with my output. the program that i'm writingis supposed to take a number input than display the output asasterisks. so if the input is 4 the output should be:
*
**
***
****
however, i'm just getting a single column of asterisks. i know itslate and i'm probably making a mental err. thanks for the help:
Help with Code Tags C++ Syntax (Toggle PlainText)
- #include <iostream>
- #include <iomanip>
- using namespace std;
- int main()
- {
- int input_1;
- int count;
- input_1 = 0;
- count = 0;
- cout<< "Enter any positive number : ";
- cin>>input_1;
- cout<< input_1 << endl; //this is totest the input only
- //need to verify for a positive number and makesure that letters are not used
- for (count = 0; count < input_1; count++)
- {
- for (count = 0; count < input_1; count++)
- cout<< " * " <<endl;
- }
- return 0;
- }
- #include <iostream>
- #include <iomanip>
- using namespace std;
- int main()
- {
- int input_1;
- int count;
- input_1 = 0;
- count = 0;
- cout<< "Enter any positive number : ";
- cin>>input_1;
- cout<< input_1 << endl; //this is totest the input only
- //need to verify for a positive number and makesure that letters are not used
- for (count = 0; count < input_1; count++)
- {
- for (count = 0; count < input_1; count++)
- cout<< " * " <<endl;
- }
- return 0;
- }
- #include <iostream>
- #include <iomanip>
- using namespace std;
- int main()
- {
- int input_1;
- int count;
- input_1 = 0;
- count = 0;
- cout<< "Enter any positive number : ";
- cin>>input_1;
- cout<< input_1 << endl; //this is totest the input only
- //need to verify for a positive number and makesure that letters are not used
- for (count = 0; count < input_1; count++)
- {
- for (count = 0; count < input_1; count++)
- cout<< " * " <<endl;
- }
- return 0;
- }
- #include <iostream>
- #include <iomanip>
- using namespace std;
- int main()
- {
- int input_1;
- int count;
- input_1 = 0;
- count = 0;
- cout<< "Enter any positive number : ";
- cin>>input_1;
- cout<< input_1 << endl; //this is totest the input only
- //need to verify for a positive number and makesure that letters are not used
- for (count = 0; count < input_1; count++)
- {
- for (count = 0; count < input_1; count++)
- cout<< " * " <<endl;
- }
- return 0;
- }
Explanation / Answer
please rate - thanks #include #include using namespace std; int main() { int input_1; int count,i; input_1 = 0; count = 0; cout>input_1; coutRelated Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.