QI Write a program which input examination marks and test it for the award of a grade. The marks are a whole number between 1 and 100. Grades are awarded according to the following criteria: i. >= 80 Distinction ii. >= 60 Merit iii. >= 40 Pass iv. < 40 fail (Hint: using logical operators) Needed C++ code B) Write a pseudo code for a program which will accept two numbers from the keyboard and calculate the sum and product displaying the answer on the monitor screen.
Q: Q.2) Write a C++ code that give the user NUM of chances to guess the letters of a name. If the user…
A: C++ Program for Above : #include <bits/stdc++.h> using namespace std; int main() {…
Q: 1. Create a flowchart and C++ program of the following problem: The manager of a football stadium…
A: To construct above program , we have taken number of ticket sold of type premium as to be np number…
Q: Activity 3 4.) Write a C program that Inputs N integers (Ask form the user how many numbers he/she…
A: Program: //header file #include<stdio.h> //definition of main function int main() {…
Q: by using c++ solve following questions. 1. Write a program that inputs age in years and…
A: Solution: 1. Program Approach: Include header files and namespace std. Define main method in the…
Q: Q3: Write a VB program to enter a mark of a student and then find his grade as follows: If mark >=…
A: Get input from user and convert it to integer. Chek the input with all conditions and print output…
Q: Write C++ statement(s) that accomplish the following: a. Declare variables x and y. Initialize x to…
A: Here we need to write a simple program and follow each step by declaring variable with their…
Q: The code below is to calculate the average age of 10 students, but contains some logical and syntax…
A: Required: The code below is to calculate the average age of 10 students, but contains some logical…
Q: Write a code snippet that can arrange the alphabets of a name entered by user in alternate cases.…
A: Procedure Followed: Declare variable str: to store a string. Read a string from the user and store…
Q: :Q1; Write a c++ program for the following äbäi 15 A student will not be allowed to sit in exam if…
A: Above problem can be resolved by taking the Input variables from User and dividing the All classes…
Q: HW4: Write a computer a program in Fortran 90 to find the value of Z. Use format statement to print…
A: program Selection implicit none ! Type declarations Integer :: X, Y, Z,i X = 5 Y = 3 !…
Q: Q1; Write a c++ program for the : following A student will not be allowed to sit in exam if his/her…
A: Formula to find the percentage of attendance: If the attendance of a student for a number of classes…
Q: 3. Write a program to convert the temperature from degrees in Celsius to degrees in Fahrenheit. The…
A: Algorithm: Step1 Start Step2 Read the input of temperature in Celsius (say C) Step3 F=(9*C)/5+32…
Q: Create a program that will display the nth numbers in the Fibonacci series. The length of the series…
A: The program is written in Java. Please check step 2
Q: 5. Archie's gallery is a store which sells gift items. The shop is also known for sending greeting…
A: EXPLANATION: - The program declares 4 char[] to store the name, email, dob, and curr_date based on…
Q: Write a C program that computes the employee’s payroll of ABC Company. The user is first asked to…
A: Name, hours, wage per hour will be the only inputs and then gross, net and all deductions are…
Q: Here is the expected output for InflationRate Part1: Enter the old and new consumer price…
A: EXPLANATION: The general formula to compute the inflation rate is “((new_cpi -…
Q: Write two scnr.nextInt statements to get input values into birthMonth and birthYear. Then write a…
A: for input use scanner class
Q: The Payroll program calculates the amount of tax withheld form an employee's weekly salary, the tax…
A: According to the Question below the Complete Program: Program Output:
Q: Q1; Write a c++ program for the following äbäi 15 A student will not be allowed to sit in exam if…
A: The programming methodology for the given program is given by: Including header files Main function…
Q: plz plz plz .... USING little Man PROGRAM !!!!!!! NOT A programing language (c# , c++ .....) I…
A: the answer is given below:-
Q: Mr. Ahamed is very much fond of buying new cars. He planned to buy a brand new Toyota use. Write a…
A: A C++ program is as follows, File name: “main.cpp” #include <iostream> #include…
Q: Q1: Write a C++ program for the : following A student will not be allowed to 15 sit in exam if…
A: Answer :- PROGRAM #include <stdio.h> int main() { printf("The mimimum attendance for…
Q: Use C++ (1) Prompt the user for a string that contains two strings separated by a comma.…
A: #include <iostream>using namespace std; int main() { while(1) { string s;…
Q: 1. Write a program that will compute the values of r, s, and h given v, w, and z. Use the given…
A: C++ is one of the most widely used programming languages in the world. The basic structure of C++…
Q: Write a C++ program to calculate the tuition fee for a student at a University. The program should…
A: NOTE : PROGRAM IS DONE WITH C++ PROGRAMMING LANGUAGE. THE PROGRAM IS EXECUTED IN DEV-C++5.11…
Q: Suppose x and y are int variables and symbol is a char variable. Assume the following input data: 4.…
A: According to the Question below the Solution:
Q: Q5.Write C++ program to compute and display a person's weekly salary as determined by the following…
A: Objective: A program should be written to calculate a person's weekly salary when the number of…
Q: a) The program randomly generates two "integers between 0 and 9 inclusive" (int1 and int2) and…
A: Programming language is not mentioned in the question. So we will answer the program in C++…
Q: Vrite a program that converts integer Fahrenheit temperatures from 0 to 212 degrees to floa Celsius…
A: I'm using C language to code:
Q: (C++) 2. Request a character from the console. Use an if/else to output if the character is an…
A: #include<iostream> using namespace std; int main(){ char c; cout<<"Input a…
Q: 2- Now we can move on to writing some code that calculates the average of 3 numbers. a) This program…
A: (a) int n1,n2,n3; printf("\nENTER THREE NUMBERS: " ); scanf("%d %d %d",&n1,&n2,&n3);…
Q: 5. Archie's gallery is a store which sells gift items. The shop is also known for sending greeting…
A: //include the required header files #include <iostream> #include<string>…
Q: Question 1: Write a C program that do the following: Ask the user to enter his grade as (A, B, C, D,…
A: Include an appropriate header in the C program such as stdio.h. stdio.h is a C header file that…
Q: Question 3: Write a program which reads in a starting day (Mon, Tue, Wed) and a time value in the…
A: from datetime import time,timedelta def main(): print("Enter a time in HHMM format:")…
Q: E Expert Q&A Please read the questions carefully before answering and also your answers must be in C…
A: Given :- Please read the questions carefully before answering and also your answers muste in C ++…
Q: 3. Write a program to convert the temperature from degrees in Celsius to degrees in Fahrenheit. The…
A: Given:
Q: Q.2) Write a C++ code that give the user NUM of chances to guess the letters of a name. If the user…
A: First of all let's understand the algorithm that should follow to solve the problem: 1. Declare a…
Q: The Payroll program calculates the amount of tax withheld form an employee's weekly salary, the tax…
A: PROGRAM CODE: #include <iostream>#include <iomanip>using namespace std; int main(){…
Q: Complete the program to read the needed values from input, that the existing output statement(s) can…
A: here is Programming Language is not mentioned so I will provide answers in c++ language. Code:…
Q: SHI Hospital provides top-notch medical care with comfortable rooms, The following are the types of…
A: Algorithm: Start Read patient name, room name, no.of days spent n, whether used critical care units…
Q: (c) You are required to create a program that reads a letter of the alphabet from the user. If the…
A: We want to check if the letter input is vowel or not, for y we have added a check, and printed…
Q: Write a program that calculates and prints the average of several integers (you don't know how many…
A: #include <stdio.h> int main(){ /* Logic to solve this problem is: take two variables…
Q: Write two scnr.nextInt statements to get input values into birthMonth and birthYear. Then write a…
A: Given: Write two scnr.nextInt statements to get input values into birthMonth and birthYear. Then…
Q: Q2 Write a C program to enter any two 4-digit numbers. Extract the first digit of both the numbers…
A: PROGRAM EXPLANATION: - The header file stdbool.h is included to work with boolean data types.…
Q: A person is eligible to be a US senator if they are at least 30 years and have been a US citizen for…
A: ''' If age < 25: Not eligible for anything. Else If age >= 30: If…
Q: Write a program that prompts the user to input three (3) integers: MM, DD, and YYYY. For example, 07…
A: Use a function to check whether year is leap year or not and then an array to save the number of…
Q: Write a program that accepts dates written in numerical form and outputs in complete form. Enter…
A: here in question In this c code, there are 3 variables m, d, and y for storing month, day, and year.…
Q: Q. 10 Write a program that accepts two string S1 and S2 and output S3 which is concatenation of the…
A: The approach of program: After accepting two strings from user, a new string variable will be taken…
Step by step
Solved in 5 steps with 2 images
- Modify the craps program to allow wagering inside of C#, and explain each step (reject if you can't). Initialize variable Balance to 1000 dollars. Prompt the player to enter a wager. Check whether the wager is less than or equal to Balance and, if not, have the user reenter the wager until a valid wager is entered. After a valid wager is entered, run one game of craps. If the player wins, increase Balance by wager, and print the new Balance. If the player loses, decrease Balance by wager, print the new Balance, check whether Balance has become zero and, if so, print the message “Sorry. You busted!” (explain steps as much as possible so I can understand plz).The program to modify has the code listed below:// Craps class simulates the dice game craps.using System; class Craps{// create random-number generator for use in method RollDiceprivate static Random randomNumbers = new Random(); // enumeration with constants that represent the game statusprivate enum Status {Continue, Won, Lost}…d. Given that an int variable s has been initialized, write a statement(s) that declares a new variable andassign it the remainder of 9 times 8 less than s divided by 4. e. Write a statement(s) that initializes the variables named a, b, c and d to false, ''one'', 'y' and 87.9respectivelyHere's my Instructions for my C++ program: Write a program to implement the algorithm that you designed in Exercise 19 of Chapter 1.Your program should allow the user to buy as many items as the user desires. Instructions for Exercise 19 of Chapter 1 have been posted below for your convenience.Exercise 19 Jason typically uses the Internet to buy various items. If the total cost of the items ordered, at one time, is $200 or more, then the shipping and handling is free; otherwise, the shipping and handling is $10 per item. Design an algorithm that prompts Jason to enter the number of items ordered and the price of each item. The algorithm then outputs the total shipping and handling fee, and the billing amount. Your algorithm must use a loop (repetition structure) to get the price of each item. (For simplicity, you may assume that Jason orders no more than five items at a time.) An example of the program is shown below: Enter the number of items ordered: 3 Enter the price of item no. 1:…
- 4. During each summer, John and Jessica grow vegetables in their backyard and buy seeds and fertilizer from a local nursery. The nursery carries different types of vegetable fertilizers in various bag sizes. When buying a particular fertilizer, they want to know the price of the fertilizer per pound and the cost of fertilizing per square foot. The following program prompts the user to enter the size of the fertilizer bag, in pounds, the cost of the bag, and the area, in square feet, that can be covered by the bag. The program should output the desired result. However, the program contains logic errors. Find and correct the logic errors so that the program works properly. // Logic errors. #include #include using namespace std; int main() { double costs double area; double bagsize; cout > bagsize; cout > cost; cout > area; cout << endl; cout << "The cost of the fertilizer per pound is: $" << bagsize / cost << endl; cout << "The cost of fertilizing per square foot is: $" << area / cost << endl; return 0; }1. Federal law requires that hourly employees be paid “time-and-a-half” for work in excess of 40 hours in a week.For example, if a person’s hourly wage is $12 and he or she works 60 hours in a week, the person’s gross pay shouldbe (40 *12) + (1.5 *12 * (60-40)) = $840.Write a program that requests the floating number of hours a person works in a given week and the person’s hourlywage as input, and then displays the person’s gross pay. Save it as overtimePay.pyI'm currently studying C++ and i have this lab i need the answer to it. Write a program that asks the user to enter a number of quarters, dimes, nickels and pennies and then outputs the monetary value of the coins in the format of dollars and remaining cents. Your program should interact with the user exactly as it shows in the following example: Please enter the number of coins:# of quarters: 20# of dimes: 4# of nickels: 13# of pennies: 17The total is 6 dollars and 22 cents
- In C++, write a program that calculates and prints a monthly paycheck for an employee. The net pay is calculated after taking the following deductions from the employee's gross salary: Federal Income Tax: 17.5% State Tax: 9.1% Social Security Tax: 6.2% Medicare Tax: 1.45% Retirement Plan: 9.29% Health Insurance: $51.48 Life Insurance: $3.71 Your program will prompt the user to input the employee ID, the employee name, and the employee's monthly gross salary. The program will calculate the deductions listed above, along with the percentage of take home pay (defined as the net pay divided by the gross salary). After calculating each deduction and percentage, the output will be printed to the screen (see example output below). Requirements All decimal numbers must be formatted to 2 decimal places. Ask for the employee's ID first, then full name (can include spaces), then the salary. The prompt to enter the salary must include the employee name. The employee ID MUST be…Q1) How to write a C program segment that prompts and accepts the age and number of hours the customer has spent in the “FUNNY Theme Park”. Then, displays the charges based on the rates shown in Figure 2 below : Age Range Rate ( per hour) (RM)0-20 1.0021-50 3.50Above 50 2.00 In your program, you have to make use of THREE(3) different defined constants for the value of rate per hour and declare the necessary variables.Question 3 (a) Re-write the following program by changing ternary / conditionaloperator to if-else statement. #include<iostream>using namespace std;int main(){int Num1, Num2, Num3;cout<<”Enter the first number\n”;cin>>Num2;cout<<”Enter the second number\n”;cin>>Num3;(Num2<Num3)? Num1=Num2 : Num1=Num3;cout<<”The smallest Number is: ”<<Num1;return 0;} (b) Re-write the following program by converting IF-ELSE statement toSWITCH statement. #include<iostream>Using namespace std;int main(){int c_area, rad, r_area,t_area, length,breadth,char choice;cout<<"Enter your choice\n”;cout<<“A or a for area of circle\n”;cout<<“R or r for area of rectangle\n”;cout<<“T or t for area of triangle\n");cout<<“E or e to exit the program\n");cin>>choice; if (choice == ‘A’ || choice == ‘a’){cout<<"Enter radius of circle: ";cin>>rad;c_area=3.14*3.14*rad;cout<<"Area of circle is: "<<c_area;}else if…
- Hell’s Kitchen decided to make a TV program that allows the user to enter 2 readings for their favorite meals, the program will then determine the lower of the 2 readings and displays a message indicating the action to be performed based on this table. 7 or Higher Increase Heat Between 5 and 7, Wait for 5 minutes then increase heat. Between 2 and 5 Wait for 10 minutes then increase heat. 2 or lower Discard Substance Write a C program that will take the input from the user 3 times, by taking the two readings every time, and determining the less of these 2 readings. NOTE: Use “While” Loop.Hello, I am having trouble with this homework question. We are covering the topic Function 2. 3.)Given the following functions: #include<iostream>using namespace std; void increment(int x, int y) {x+=y;} int main() {int n=10, amount = 5;increment(n,amount);cout << n << "\n";return 0;} 1. Explain the problem with the increment function. 2. Explain how to fix the problem without changing the main function.C++ write a program that calculates and prints the take-home pay for commissioned sales employee. Allow user to enter value for the name of employee and the sales amount for the week. Employee receive 7% of the total sales. Federal tax rate is 18%. Retirement contribution is 10%. Social Security tax rate is 6%. Use appropriate constants