Use a for loop to calculate how many pizzas are made in the

Use a for loop to calculate how many pizzas are made in the month of February (28 days). If n (will need an input) pizzas are made per day, output the total number of pizzas that have been made to date on each day of the month. The output should reflect a calendar, having 7 days per week (one line). The input value does not need to be output

Solution

//diaplay sum for 30 days

for(perday=1;perday<=30;perday++)

{

//add 28 to every day

sum=sum+28;

//display perday and sum

cout<<perday<< \" =\"<<sum<<\"\\t\";

}

 Use a for loop to calculate how many pizzas are made in the month of February (28 days). If n (will need an input) pizzas are made per day, output the total nu

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site