Using while or do while. An ordinary colored printer can print 12 pages per minute. Make a program that will input number of pages, and compute the time to complete the print out. Consider the minutes and hour of your display. Your program will terminate if you input zero in the number of pages.
(minutes =no.pages /12) Ex: Input pages : 720
Minutes = 60 Hour= 1
#include<iostream>
using namespace std;
int main()
{
int num,time,hour;
cout<<"Enter the number of pages: ";
cin>>num;
time=num/12;
hour=time/60;
cout<<"Minutes= "<<time<<" Hour= "<<hour;
}
Comments
Leave a comment