Write a C++ program that takes as input an arbitrary number of red blood cell counts in the range 0 to 50 and does two things: 1. computes and prints the average red blood cell count 2. prints out a simple histogram of the red blood cell counts using the following categories: - healthy red blood cell: 35 to 50 (inclusive) anemic red blood cell: 0 to less than 35 Example:
Q: Write a C++ program that reads student scores, determines the best score, and assigns grades using…
A: ALGORITHM:- 1. Take input for the number of student marks. 2. Create a marks array of that size. 3.…
Q: Write a program in C++ that lets the user input an odd number of positive integers (space separated)…
A: Logic:- First take input from user , the number of elements and all elements. Apply check if n is…
Q: Write a C++ program that prompts the user for the length and the width of a rectangle. The program…
A: Start Input length Input width Calculate Area Calculate Perimeter Display Area Display Perimeter…
Q: Write a simple C program that can determine whether a machine is little- or big-endian. 2. Printing…
A: Here is the solution:-
Q: Write a C program using if-else. The program reads one integer number k. Then it reads one real…
A: Inside if, check the value of k whether it is either 4 or 5 So, n is represented as n = 3f-67π
Q: Write a C++ program that will allow the user to input the First Name, Last name, Middle Initial, and…
A: Introduction: Here we are asked to create a program in C++ program that will allow the user to…
Q: Write a program in c++ source code to read the radian of a circle, check if it is bigger than zero,…
A: Code: #include <iostream>#define PI 3.14159using namespace std; int main() { float…
Q: Write a C++ program for an automobile workshop to check a vehicle’s engine condition. The program…
A: C++ is a powerful general-purpose programming language and computer programming language which can…
Q: Write a C++ program that takes as input an arbitrary number of red blood cell counts in the range 0…
A: #include <iostream>using namespace std; int main() { int i, count ; float…
Q: Write a C++ program that will allow the user to input the First Name, Last name, Middle Initial, and…
A: 1. Declaring fname,lname,minitial,grade 2. Asking user to enter the first name,last name,middle…
Q: Write a C program that reads the value of an integer variable x and the value of a character…
A: function colorRange(int x) //char return type step 1:- Start step 2:- if (x = 0 to 10) then return…
Q: Write a C program that plays the game of "Guess the Number" as follows: Your program should choose a…
A: The program Declaration and initialization of the variables. Initialize n and count equal to zero.…
Q: Write a C# program that lets the user enter an object’s mass and then calculates its weight. If the…
A: using System; namespace ConsoleApplication1{ class Program { static void Main()…
Q: Write a C++ program which has an user input of decimal, octal, or hexadeciaml (all three types of…
A:
Q: Write a program in C++ that asks the user how many numbers she would like to compare; Then accepts…
A: The following algorithm is required for writing the program to find the smallest, largest from given…
Q: Write a C++ program that computes the rental fees of N cars; N is the first input by the user. For…
A: The problem is based on the basics of C++ programming language.
Q: Write a program in C++ that lets the user input an odd number of positive integers ( each separated…
A: Sample Output
Q: Write a C++ program that reads five cards from the user, then analyzes the cards and prints out the…
A: Program: #include <iostream>using namespace std;const int numCards = 5; // function…
Q: Write a c++program to simulate the roll of two dice. If the total of the two dice is 7 or 11, you…
A: Let us consider a C++ program to simulate the roll of two dice, if the total of the two dice is 7or…
Q: Write a program in C++ with total change amount as an integer input, and output the change using the…
A: The program is written in step 2
Q: Write a console application in c++ that prints the next 20 leap years. A leap year is a year in…
A: An year is said to be a leap year if it is multiple of 400 or multiple of 4 but not multiple of 100
Q: Write a complete C++ program that reads a positive and non-zero integer then do the following: 1.…
A: Note: 2. Divisors of number 20 are: 10, 5, 4, 2, 1. Therefore, even divisiors are 3 and not 4. 3.…
Q: Write a C# program that plays a guessing game with the user. Your program should select a random…
A: Given Hints:- Some Random Number Generation HintsRandom rndNumber = new…
Q: Write a C/C++ program that asks the user for three integer marks. These are the student marks out of…
A: The marks are calculated as 50% weightage from normal tests and 50% weightage from big test
Q: Write an interactive C program that prompts for and reads an integer number between 1,100 and…
A: Algorithm: The algorithm for the program is: Start Initialise the variables Read an integer between…
Q: Write a C ++ program that reads temperatures for 3 days and then calculates and prints average…
A: #include <iostream>using namespace std;int main() { int num1, num2, num3; cout <<…
Q: Write a C# program that converts a temperature given in Fahrenheit to Celsius. Allow the user to…
A: using System;using System.Collections.Generic;using System.Linq;using System.Text; namespace…
Q: Write a C++ program that will allow the user to input the First Name, Last name, Middle Initial, and…
A: INTRODUCTION : Here we write a c++ program that allow the user to input the First Name , Last Name ,…
Q: Write a C++ program that computes and display the final grade of the student based on the three…
A: #include<iostream> using namespace std; int main(){ int percentage; cin >>…
Q: write a C program that has the following statements int a,b; a = 10; b = a + fun(); printf("With…
A: I have given an answer in step 2.
Q: Write a C++ program that prompts the user to input an integer and then outputs both the individual…
A: #include <iostream>using namespace std;int main() { int n,a[20],i=0; cout<<"Enter…
Q: Write a C program using if-else. The program reads one integer number a. Then it reads one integer…
A: Here is c code of above problem. See below step.
Q: Write a C++ program that will repeatedly ask the user to enter an integer quantity of liquid given…
A: Program Explanation: The header file “<iostream>” is declared that contains all standard…
Q: Write a C++ program that reads a five-digit integer value representing MINUTES. The program should…
A: Note : Since there are multiple questions, according to the guidelines I have done the first…
Q: Write a C program that will ask the user to enter an integer number, then if the number even it will…
A: In the given question, we have to write C program that will ask user to enter an input(integer…
Q: Write a C program that prompts the user to enter a number that represents his/her type as follows:…
A: Code and sample output is in step2.
Q: Write a program using C++ for the following: A program that allows students to register their…
A: Programming Language : C++ Two primary functions needed. One for students to register and second for…
Q: Write a C program that requires a user to input weight and height so that it can calculate weight to…
A: Given: Write a C program that requires a user to input weight and height so that it can calculate…
Q: From the given figure, write a program in C++ base Q3: LANGUAGE to read the height of cylinder then…
A: Introduction of Program: The C++ program takes height, radius, and the number of cylinders from the…
Q: Write a program in c++ to read the radian of a circle, check if it is bigger than zero, and if it is…
A: Required: Write a program in c++ to read the radian of a circle, check if it is bigger than zero,…
Q: Write a program in C++ that converts square meter into ping. The program prompts the user to enter a…
A: Below is the required C++ program: - Approach: - Including the header file “iostream” and using the…
Q: Write a C++ program that will allow the user to input the First Name, Last name, Middle Initial, and…
A: First, we will input the first name, last name, and middle initial. Now we will input the grade of…
Q: Write a C++ program that asks the user to enter the radius of the circle and then find the…
A: As per the requirement program is developed in c++. Algorithm: Step 1: Define the pi constant to the…
Q: Write a C program that plays the gam of "guess the number" as follows: Your program chooses the…
A: Use while loop to check whether the number is same as guess or not Use another while loop to check…
Q: write a program in c++ Type equal to 'G', If classification is equal to 5 then set the character…
A: #include <iostream> using namespace std; int main(){ int classification; cout <<…
Q: Write a program (C,C++ or any other language) where a shop owner can input daily sales and calculate…
A: I am using c++ Algorithm: Start Read no.of days n Read sales for n days in an array a Read price of…
Q: sor works to read the pollution value in four industrial sites every four hours a day, so you want…
A: Goal: get pollution reading from the sensor using c++ program for 4 sites and calculate pollution…
Q: Write a program in c++ to read the radian of a circle, check if it is bigger than zero, and if it is…
A: ask the user to give the radius of the circle as input pass the radius as to the function called…
Q: Write a C++ program that reads student scores, determines the best score, and assigns grades using…
A: #include <iostream> using namespace std; char getGrade(int score, int best){ char…
Problem 27 - Arrays
C++ program pls
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 3 images
- Write a program that prompts the user to input a number. The program should then output the number and a message saying whether the number is positive, negative, or zero. Write a program that prompts the user to input three numbers. The program should then output the numbers in descending order (big to small). An internet service provider has three different subscription packages for its customers: Package A: for RM9.95 per month 10 hours of access are provided. Additional hours are RM2.00 per hour. Package B: for RM13.95 per month 20 hours of access are provided. Additional hours are RM 1.00 per hour Package C: for RM 19.95 per month unlimited access is provided. Write a JAVA program using if/else or switch selection to calculates a customer’s monthly bill. It should ask the user to enter the letter of the package the customer has purchased (A, B, or C) and the number of hours that were used. It should then display the total charges.Write a program named CopenhagenTransit that computes the fare on the Copenhagen Transit system given two inputs from the user: The zone number: 1 or more The passenger type: adult or child Your prompts to the user must be : Enter zone number : Enter adult or child : The fare on Copenhagen Transit is specified as follows: If the zone is 2 or smaller and the ticket type is "adult," the fare is 23.0. If the zone is 2 or smaller and the ticket type is "child," the fare is 11.5. If the zone is 3 and the ticket type is "adult," the fare is 34.5. If the zone is 3 or 4 and the ticket type is "child," the fare is 23.0. If the zone is 4 and the ticket type is "adult," the fare is 46.0. If the zone is greater than 4, the fare is -1.00 (since your calculator does not handle inputs that high). Your output must be in the format: The fare for adultOrChild to zone number zoneNumber is fare. A sample run of the program with inputs 3 and adult must look like: Enter…Write a program that converts U.S. Dollar Amounts to different Cryptocurrencies by multiplying US Dollar amounts times conversion factors stored in named constants. Ask the user to enter the amount of money in U.S. Currency, then display the output of the conversions to the different cryptocurrencies listed below. The following conversion rates must be stored as named constants: 1 US Dollar = 0.00002306 Bitcoin (BTC)1 1 US Dollar = 0.01122814 Ethereum Classic (ETC)1 1 US Dollar = 2.07961078 Dogecoin (DOGE)1 1 US Dollar = 0.48910811 Cardano (ADA)1 Format your currency amounts in fixed point notation with two decimal places of precision, and be sure that the decimal point is always displayed.
- Write a program that displays the classic BINGO game, displays a BINGO card (5x5 square), and tests the bingo card for a winner via 2 users Steps: 1- Ask user 1 to enter 24 numbers between 10-40 no duplicates / check for range and repetition 2- Ask user 2 to enter 24 numbers between 10-40 no duplicates / check for range and repetition 3- Design 2 BINGO cards as you see below 4- Distribute the numbers onto the 2 cards with each user input with 0 in the middle 5- Display the 2 cards in 1 screen as you see below 6- Generate a random number between 10-40 no duplicates / check for range and repetition 7- Compare the random number with the numbers on the 2 cards 8- If the random number matches any number on each card, change the number on the card to 0 9- Check for winning cards 5 numbers in a row or column = 0 5 numbers in a diagonal = 0 all 4 corners of the card = 0 if any of the players won, display who is the winner and exit the program if the 2 players won, display both are the…Write a program that calculates and prints the total bill at a restaurant. Prompt the user for the cost of the meal and then ask if a tip will be added. If it is, prompt for the tip percent as an integer. Of course, the tip percent should not be requested if no tip will be added. Finish by printing the meal cost, tip amount, and total bill. Sample OutputEnter total cost of the meal 80Are you adding a tip? y/n yEnter the tip percent as an integer 25Here is your bill.Meal cost $80.00Tip $20.00Total cost $100.002.Write a program that allows the user to enter the names of five candidates in a local electionand the number of votes received by each candidate. The program should then output eachcandidate’s name, the number of votes received, and the percentage of the total votes receivedby the candidate.Your program should also output the winner of the election. A sample output is:Candidate Votes Received % of Total VotesAslam 5000 25.91Ali 4000 20.73Raza 6000 31.09Bilal 2500 12.95Hammed 1800 9.33Total 19300The Winner of the Election is Raza.
- Suppose you save $100 each monthin a savings account with annual interest rate 3.75%. The monthly interest rateis 0.0375 / 12 = 0.003125. After the first month, the value in the accountbecomes100 * (1 + 0.003125) = 100.3125After the second month, the value in the account becomes100 + 100.3125) * (1 + 0.003125) = 200.938After the third month, the value in the account becomes(100 + 200.938) * (1 + 0.003125) = 301.878and so on.Write a program that prompts the user to enter an amount (e.g., 100), the annualinterest rate (e.g., 3.75), and the number of months (e.g., 6) and displays theamount in the savings account after the given month.Write a program CheckDigit.java that takes a 12 or 13-digit long as a command-line argument and displays the digit computed as follows: Take for an example the number 048231312622 Sum every other digit of the code, starting from the right. In the example, that is 2 + 6 + 1 + 1 + 2 + 4 = 16. Discard the tens digit and keep the ones digit, 6. Start with the second to last digit and do the same thing. Sum the digits, discard the tens digit and keep the ones digit. In this example this is 2 + 2 + 3 + 3 + 8 + 0=18. Discarding the 10 leaves 8. Multiply this number by 3 and again discard the tens digit. 8×3 = 24, leaving 4. Add the numbers from steps 1 and 2. Again drop the tens digit. 6 + 4 = 10, leaving the digit 0 (zero). Hint 1: the maximum value that can be stored in an integer variable is 2147483647 which is only 10 digits long. To read a 12 or 13-digit integer from command line argument you will need to store it in a long variable. Use: long number =…Write a program that asks the user to type in a time in seconds and display it in the standard format hours:minutes: seconds (where 1 hour = 3600 seconds and 1 minute = 60seconds). Your output should look similar to this: output: Time in seconds: 3725 time is : 1:2:5
- THIS IS IN JAVA Which value of x results in short circuit evaluation, causing y < 4 to not be evaluated? <pre><code>(x >= 7) && (y < 4)</code></pre> A. 6 B. 7 C. 8 D. No Such ValueWrite a program that asks for the user's name and year of birth, greets the user by name,and declares the user's age in years. Users are assumed to be born between the years1800 and 2099, and should enter the year of birth in one of the three formats 18XX,19XX, or 20XX . A typical output should be "He llo Caroline, you are 23 years old ."Suppose that the cellular phone bill of a client is computed according to the following ratestable for calls:First 5 min P100.00 (minimum charge)Next 10 min P8.00 per minNext 15 min P6.00 per minExcess over 30 min P1.50 per minText messages cost P1.00 per send. Write a program that computes the phone bill based onthe number of minutes used up and the number of text messages sent that are to be readfrom the keyboard. The program should be able to compute the bill for a maximum of 10clients. The user specifies the number of clients to be billed at the start of the program.