Question

Q4. Write an algorithm, draw the flowchart and write a C++ program to • Read the Number and Letter from the user • Check the
0 1
Add a comment Improve this question Transcribed image text
Answer #1

Algorithm Step1 : Start Step 2: Declare variables for monthNumber and monthletter Step 3: Read values monthNumber and monthLe

FlowChart

Start accept monthNumber and monthLetter Yes monthNumber = 1 and monthLetter=J JANUARY No Yes monthNumber = 2 and monthLette

C++ Program code using online free compiler tool for C++

Run Debug Stop Share Save {} Beautify main.cpp 1 2 #include <iostream> 3 using namespace std; 4 int main() 5-{ 6 int monthNum

Result for the program output for one scenario

Run Debug Stop Share Save { } Beautify main.cpp 4 5-{ 1 2 #include <iostream> 3 using namespace std; int main() 6 int monthNu

Add a comment
Know the answer?
Add Answer to:
Q4. Write an algorithm, draw the flowchart and write a C++ program to • Read the...
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. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Q1: Write an algorithm and sketch the flowchart to read 20 numbers for x and finding...

    Q1: Write an algorithm and sketch the flowchart to read 20 numbers for x and finding the number of times that the number 100 is repeated between these numbers. (12 marks) Q2: What is the difference between prefix decrementer (- - i) and postfix decrementer (i - -) explain using examples. Q3: C++ includes a very special operator called the ternary operator. Explain with example how this operator used? Q4: Write C++ Program which output this result ******50 *****500 ****5000...

  • please write psedocodes for all of the questions and an algorithm for 2. no coding is...

    please write psedocodes for all of the questions and an algorithm for 2. no coding is required . FIUJELI 95 PIOL 1. (Geometry: Area of a Pentagon) Write a C# program that prompts the user to enter the length from the center of a pentagon to a vertex and computes the area of the pentagon, as shown in the following figure. The formula for computing the area of a pentagon is Area = 2 , where s is the length...

  • (write algorithm and draw flowchart) for this question Write a C program which has a function...

    (write algorithm and draw flowchart) for this question Write a C program which has a function that takes two numbers and find the largest and the smallest number and find the result of the largest power of smallest.(for example If the entered numbers are 6 and 3 the result is 6³)

  • draw the flowchart for : 1. PseudoCode algorithm: Declare variable of type float a,b, sum=0 Print...

    draw the flowchart for : 1. PseudoCode algorithm: Declare variable of type float a,b, sum=0 Print "Enter 2 float numbers" input a and b; compute sum=a+b; print sum 2. Declare variable of type integer a, b, max Print "Enter 2 integer numbers" input a and b; if a>b max=a; else max=b; print "Maximum of two is ", max;

  • Draw a flowchart for the program that will read an unknown number of ages. (0 is...

    Draw a flowchart for the program that will read an unknown number of ages. (0 is a valid age used for a baby.) The user will enter a negative number if there are no more ages to enter. The program will output the average age and youngest and oldest ages. If no ages were entered, display “No ages were entered”

  • This program is in C++ Write a program that validates charge account numbers read in from...

    This program is in C++ Write a program that validates charge account numbers read in from the file Charges.txt following this assignment (A23 Data). Use a selection sort function on the array to sort the numbers then use a binary search to validate the account numbers. Print out the sorted list of account numbers so you can see the valid ones. Prompt the user to enter an account number and the validate that number. If the account number entered is...

  • Zeller's congruence is an algorithm developed to calculate the day of the week. Write a program...

    Zeller's congruence is an algorithm developed to calculate the day of the week. Write a program that prompts the user to enter a year, month, day of month and it displays the name of the week. Here is my source code. I need it broke down into a flowchart. public static void main(String[] args) {        //all variables are initialized to 0, because local variables require at least an initial value before use        Scanner input = new...

  • Write a program in C++ to read a large piece of text from the user (multiple...

    Write a program in C++ to read a large piece of text from the user (multiple lines) until the user inputs EOF. Assume the input only contains alphabets, numbers, commas and periods. The program should first compute the number of occurrences of each character in the input. Next, the program displays a sorted list (in descending order) of each character and the corresponding number of occurrences of that character. The sorting should be performed on the counts and not the...

  • Write the class SwitchingUpMonths.java. This program will be completing exactly the same task as Lab3c, however...

    Write the class SwitchingUpMonths.java. This program will be completing exactly the same task as Lab3c, however you will need to use switch-case conditional statements instead of if-else That is, your program must: 1. Asks a user to enter the name of a month 2. Confirms the User's input. 3. Prints the abbreviation and number corresponding to that month The sample output for input February Enter the month You entered February Its abbreviation is FEB This is month number 2

  • 1- Write a program to read 10 numbers and find the average of these numbers. Use...

    1- Write a program to read 10 numbers and find the average of these numbers. Use a while loop to read these numbers and keep track of input numbers read. Terminate the while loop with a sentinel value. 2- Now modify the program to find the maximum of these numbers as well. The program should print the number of elements read as input and run until -1 is entered. (-1 is the sentinel that terminates the loop and the program)...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT