Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

How many text messages do you send in a day? In a month? How long does it take t

ID: 3637245 • Letter: H

Question

How many text messages do you send in a day? In a month? How long does it take to read a text message you have received? At this rate, how many days will it take to send 100,000 messages? How much total time will those messages take to send? Do the questions never stop?

For this assignment, you will write a program that prompts the user to input the number of text messages they send and receive in a typical month. You will also prompt them for an estimate of the time needed to send a typical text message and the total disruption time when receiving a text message. (Disruption time is defined as the number of seconds elapsed from the moment the text message is received until resuming whatever activity was interrupted).

With these values, you are to compute the following quantities:

The number of days it will take the user to send 100,000 messages.
The number of messages the user should expect to receive during those days.
The total amount of time the 100,000 messages will take the user to send.
The total disruption time produced by the messages received during that time.

Express each amount in total days, and also in years, months, weeks, days, hours, and minutes. Of course, the number of days in a month varies. So does the number of days in year.

Explanation / Answer

cout<<"Number of Days to send 100000 messages :";
cout<<getsentDays(noOfmessages,timeSent)<<endl;
//cout<<"Number of Messages receive :"<<endl;
//cout<<getMessages(timeSent)<<endl;
//cout<<"Total Time to send 10000 messages :";
//cout<<getSenttime()<<endl;
//cout<<"Total Disruption Time :"<<getDisruptionTime();

system("pause");
return 0;
}

double getsentDays(double messages,double time)
{
double totalSec=messages*time;
cout<<"Total Years "<<getYears(totalSec);
cout<<"Total Months"<<getMonths(totalSec);
cout<<"Total weeks"<<getWeeks(totalSec);
cout<<"Total Days"<<getDays(totalSec);
cout<<"Total Hours"<<getHours(totalSec);
cout<<"Total Minutes"<<getMinutes(totalSec);
}

int getYear(double secs)
{
int sec=(int)secs%31536000;
return sec;
}

int getMonths(double secs)
{
int months=((int)secs%31536000)*12;
return months;
}

int getWeeks(double secs)
{

int weeks=((int)secs%31536000)*12*4;
return weeks;
}

int getDays(double secs)
{
int days=((int)secs%31536000)*365;
return days;
}

int getHours(double secs)
{
int hours=(int)secs%31536000;
  hours=hours%60;
  return hours;
}
int getMinutes(double secs)
{
int minutes=(int)secs%31536000;
  minutes=minutes/60;
  return minutes;
}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote