Question

IN C++ PLEASE!! Design and implement a programming (name it NextMeeting) to determine the day of...

IN C++ PLEASE!! Design and implement a programming (name it NextMeeting) to determine the day of your next meeting from today. The program reads from the user an integer value representing today’s day (assume 0 for Sunday, 1 for Monday, 2 for Tuesday, 3 for Wednesday, etc…) and another integer value representing the number of days to the meeting day. The program determines and prints out the meeting day. Format the outputs following the sample runs below.

Homework Answers

Answer #1
#include <iostream>
#include <string>

using namespace std;

int main() {
    int n1, n2;
    string days[] = {"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"};
    cout << "What is the current day[0-6]: ";
    cin >> n1;
    cout << "How many days: ";
    cin >> n2;
    cout << "Today is " << days[n1] << endl;
    cout << "Days to the meeting is " << n2 << " days" << endl;
    cout << "Meeting day is " << days[(n1 + n2) % 7] << endl;
    return 0;
}
Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Write a Python program that reads in the month, day, and year of a date and...
Write a Python program that reads in the month, day, and year of a date and prints it in the dd/mm/yyyy format or mm/dd/yyyy format, the format depending on the user’s preference. The program also prints the message It is a magic date If the product of month and day is equal to the last two digits of the year. For example, April 20 1980 is a magic date because April (numeric value 4) multiplied by 20 is equal to...
1 Design and implement FileCompare program that compares two text input files (file1.txt and file2.txt), line-by-line,...
1 Design and implement FileCompare program that compares two text input files (file1.txt and file2.txt), line-by-line, for equality. Print any lines that are not equivalent indicating the line numbers in both files. The language of implementation is java 2 . Create a program that reads a string input from the user, then determines and prints how many of each lowercase vowels (a, e. i, o, and u) appear in the entire string. Have a separate counter for each vowel. Also...
Design and implement a function with no input parameter which reads a number from input (like...
Design and implement a function with no input parameter which reads a number from input (like 123). Only non-decimal numbers are valid (floating points are not valid). The number entered by the user should not be divisible by 10 and if the user enters a number that is divisible by 10 (like 560), it is considered invalid and the application should keep asking until the user enters a valid input. Once the user enters a valid input, the program calculates...
Design and implement an application that reads a string from the user and then determines and...
Design and implement an application that reads a string from the user and then determines and prints how many of each vowel appear in the string. Have a separate counter for each vowel. Also, count and print the number of non-vowel characters. Note: The characters in the string must be considered as case-insensitive. i.e., You must consider both upper and lowercase letters as same. Example Output: Enter a string: hello Number of each vowel in the string: a: 0 e:...
Book name is Starting Out with Programming Logic and Design (5th Edition) Chapter 6: Functions Algorithm...
Book name is Starting Out with Programming Logic and Design (5th Edition) Chapter 6: Functions Algorithm Workbench 1. Design a simple function named timesDozen that accepts an Integer argument into a parameter named nbr. When the function is called, it should return the value of its argument multiplied times 12. 2. Assume that a program has two String variables named alpha and bravo. Write - a pseudocode statement that assigns an all uppercase version of alpha to the bravo variable.
Write answer in C programming language please 2.36 LAB: Warm up: Variables, input, and casting (1)...
Write answer in C programming language please 2.36 LAB: Warm up: Variables, input, and casting (1) Prompt the user to input an integer, a double, a character, and a string, storing each into separate variables. Then, output those four values on a single line separated by a space. (2 pts) Note: This zyLab outputs a newline after each user-input prompt. For convenience in the examples below, the user's input value is shown on the next line, but such values don't...
USE PYTHON ONLY PLEASE Zeller’s congruence is an algorithm developed by Christian Zeller to calculate the...
USE PYTHON ONLY PLEASE Zeller’s congruence is an algorithm developed by Christian Zeller to calculate the day of the week. The formula is h = (q + 26(m+1)//10 + k + k//4 +j//4 +5j) % 7 where - h is the day of the week (0: Saturday, 1: Sunday, 2: Monday, 3: Tuesday, 4: Wednesday, 5: Thursday, 6: Friday). - q is the day of the month. - m is the month (3: March, 4: April, ..., 12: December). January...
JAVA: Design and implement a recursive version of a binary search.  Instead of using a loop to...
JAVA: Design and implement a recursive version of a binary search.  Instead of using a loop to repeatedly check for the target value, use calls to a recursive method to check one value at a time.  If the value is not the target, refine the search space and call the method again.  The name to search for is entered by the user, as is the indexes that define the range of viable candidates can be entered by the user (that are passed to...
Complete Programming Assignment Chapter 10. Use program In JAVA ProductCodes.java on pages 446-447, it will provide...
Complete Programming Assignment Chapter 10. Use program In JAVA ProductCodes.java on pages 446-447, it will provide you most of the needed code. You are to design and implement a program that reads a series of 10 integers from user and print the average. Read each integer as a string and convert to integer using Integer.parseInt method. If this process throws a NumberFormatException (not a valid number), catch and handle the exception by printing an error message "Not a valid entry,...
Your assignment is to implement a computer program in C++ to implement the below application. According...
Your assignment is to implement a computer program in C++ to implement the below application. According to Dummies.com the following algorithm determines the amount of paint you need to paint the walls of a four-sided room: 1. Add together the length of each wall. (For example, if each of the four walls are 14, 20, 14, 20 feet respectively then the total length is 14 + 20 + 14 + 20 = 68 feet) 2. Multiply the sum by the...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT