Question: How do I make my program work with odd numbers? #include using std::cout; using std::cin; using std::endl; int main() { cout < > width >>
How do I make my program work with odd numbers?
#include
using std::cout; using std::cin; using std::endl;
int main() {
cout <<"Enter a value for Width and a value for Height: "<< endl; double width; double height; cin >> width >> height;
for (double h{1}; h<=height; h++){ for (double w{1}; w<=(width/2); w++){ cout << "*"; cout << "#"; } cout << endl; }
return 0;
}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
