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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!