NOTE: Solve this as soon as possible, I need this urgently. Write a program that will ask the user to enter Date of Birth (DOB) and current date as input. Program will compute and display the user age in years, months and days on the screen. (For simplicity assume each month has 30 days). (E.g. if DOB = 25 – 09 – 1990 , Current Date = 04 - 03 - 2019 , User Age will be 28 %3D years, 5 months and 9 days )
Q: Write a program that calculates the change due a customer by denomination; that is, how many…
A: Answer is given below .
Q: - Write a program to compute the mass flow rate of a fluid (in kg/sec) through a thermal unit…
A: Dear learner , Hope you are doing well , I will try my best to answer this question. Thank You!!
Q: The following equations estimate the calories burned when exercising (source): Women: Calories = (…
A: Since you have not provided the sample output in the question, we have attached the output in most…
Q: Write a program that reads from the user two integers of three digits each. The program finds the…
A: import java.util.*;public class Main{ // to display the digits of number separated by space public…
Q: rite a program using inputs age (years), weight (pounds), heart rate (beats per minute), and time…
A: Program approach: Input age, weight, heartRate, and time. Compute women calories calories_woman…
Q: Show manual tracing for the following program and find the final output. In the program,…
A: The program given is: #include<stdio.h>int a, b;int func1(float x);void func2(int x, float y);…
Q: Write a program that calculates the potential energy of 3 charges q1 = 1, q2 = 2, q3 = 3 located at…
A: C program: #include <stdio.h>#include<math.h> // function to print distancefloat…
Q: Write a program that computes for the Electric Field and Electric Potential at a given point in a…
A:
Q: Modify the above program to compute the side area, total area, and volume of a cylinder and the area…
A: PROGRAM STRUCTURE: Include the required header files. Write the definition of the first function.…
Q: For this exercise When analyzing data sets, such as data for human heights or for human weights, a…
A: Use the below code which satisfies your requirement. Also provided screenshot for your reference.…
Q: Example-3: Write a program to calculate the Area and volume for a sphere. Sol. -The area of sphere =…
A: In the above code, it has been asked to print the area and volume of the sphere, in the following…
Q: Write a program that prompts the user to enter the minutes (e.g., 1 billion), and displays the…
A: NOTE: SINCE THE LANGUAGE OF THE CODE IS NOT MENTIONED, I HAVE USED JAVA FOR THE SOLUTION. Define…
Q: ncreme
A: The program provided below calculates flame theoretical temperature when a mixture of methane,…
Q: Write a program that reads the volume, V, as a floating-point number. It then computes and prints…
A: Given, that volume V is a floating-point number which has to be an input by user. Now, considering V…
Q: Write a program that prompts the user to enter theminutes (e.g., 1 billion), and displays the number…
A: Program code: //IMPORT Scanner class import java.util.Scanner; //define a class NoOfYears public…
Q: A robot is initially located at position (0, 0) in a grid [−5, 5] × [−5, 5]. The robot can move…
A: Program code: //include the required header files #include <iostream> /* srand, rand */…
Q: Modify the above program to compute the side area, total area, and volume of a cylinder and the area…
A: The program is written in java
Q: Using the following atomic weights carbon 12.0110 hydrogen 1.0079 oxygen 15.9994 revise your program…
A: We have to write a Python program using while loop of molecular weight of chemical compound…
Q: Write a program that simulates the rolling of two dice. The program should use rand to roll the…
A: 1. Create an array of integer of length 13 a. loop from 0 to 36000 i. get…
Q: OUT = IN1 + IN2 – IN3
A: Mailbox Mnemonic code Numeric code 00…
Q: Write a program that calculates the number of hours, minutes, and seconds in N seconds. Example: In…
A: The above question is solved in step 2 :-
Q: In this task, you are required to write a code which takes as an input an angle [0°, 90°] in radians…
A: Step 1 : Start Step 2 : In the main function , Take user input for the value of the angle in radians…
Q: In this task, you are required to write a code which takes as an input an angle [0°, 90°] in radians…
A: Step 1 : Start Step 2 : In the main function , Take user input for the value of the angle in radians…
Q: Write a program that computes for the Electric Field and Electric Potential at a given point in a…
A: There are three possible conditions and use if-else if ladder to compare the values of d and r
Q: Write a program that takes as input a number of kilometers and prints the corresponding number of…
A: km = int(input("Enter the number of kilometers: ")) nautical_miles = (1/10000) * (90 * 60) * km…
Q: Write a program which takes two float numbers from the user and check, if first number is greater…
A: Algorithm: Start Read 2 float numbers m1,m2 if the first number is greater add 5 in the first…
Q: Write a Python (or R) program that asks the user to enter an integer (X), then: • Determines if X is…
A: Python is an interpreted, object-oriented, high-level programming language with dynamic semantics.
Q: The following equations estimate the calories burned when exercising (source): Women: Calories = (…
A: Though the question did not specify the programming language, the program has been developed using…
Q: Write a program which takes two float numbers from the user and check, if first number is greater…
A: The user has not given the language to answer . I have give the answer in C++ . Please run and give…
Q: You can find out how many seconds have elapsed since Jan 1, 1970 using the time() function. #include…
A: Algorithm Steps:- 1. Find the number of seconds since Jan 1, 1970, using the time(NULL) function…
Q: MATLAB has a function called round that rounds a number to the nearest integer. As an example, round…
A:
Q: Write a program that prompts the user to enter an integer from 1 to 7 and displays a pyramid, as…
A: Please find the answer below :
Q: The formula for the computation of the volume of cylinder is V = Tr?h. Write a program that will…
A: Algorithm to find the volume of the cylinderStep1: Set the constant Pi=3.1415Step2: Declare…
Q: • Write a program that computes the average of 5 students grades which are entered by the user.
A: According to the guidelines we are supposed to answer only 1 question. So I am solving the first…
Q: The following equations estimate the calories burned when exercising (source): Women: Calories = (…
A: Program: #definition of main function if __name__ == '__main__': #get the inputs data =…
Q: An oil slick occurs when an underwater refinery pipe ruptures, pumping oil into the water. The…
A: Program code: // include required header files #include <iostream> #include <iomanip>…
Q: Please use python The following equations estimate the calories burned when exercising (source):…
A: PROGRAM EXPLANATION: - The user enters decimal values in 1 line. The input is taken using input…
Q: Modif
A: NOTE: Programming language is not mentioned, so doing in C++ In this question, we are asked to print…
Q: Write a program that calculates the potential energy of 3 charges q1 = 1, q2 = 2, 43 = 3 located at…
A: please do upvote for my efforts thanks! answer: CODE #include…
Q: Demonstrate the function by calling it in a program that asks the user to enter values for mass and…
A: Program is written in C++ language. We have to input mass and velocity by checking whether both are…
Q: Write a program that reads three numbers and prints "increasing" if they are in increasing order,…
A: Please find the answer below :
Q: Write a program that allows the user to specify the number of iterations used in this approximation…
A: # if you want value of pi then you need to multiply by 4 in given equation# because the relation is…
Q: Exercise : Make a program that calculates the volume of water in a rectangular fish tank by - taking…
A: To Do: To write the python code.
Q: Write a program that computes the following equation: 1 2 y = 1++ x2 п + - ...
A: Given that, Write a program that computes the following equation: y = 1+1x+2x2+3x3+....+nxn
Q: The problem was to write a program which allocates the integers 1-8 to the squares in the figure…
A: Code : #include <cstdlib>#include <iostream>using namespace std; void backtrack(int…
Q: In this task, you are required to write a code which takes as an input an angle [0°, 90°] in radians…
A: This is C++ related program and working perfectly fine and giving the correct result. Note that for…
Q: Write a program which takes two float numbers from the user and check, if first number is greater…
A: program: #include <iostream> using namespace std; int main(){ float m1,m2;…
Step by step
Solved in 3 steps with 1 images
- f. A laborant in a laboratory does a number of antigen tests in one day. Write a program that simulates the number of antigen tests done in a day in a laboratory, displays the number of positives and negatives, and calculates the % of positives in one day. Your program needs to first generate a random number that will show the number of tests done in a day. One laboratory in a day cannot do more than 100 tests and less than 1 (they do at least one). Then for each of the tests, your program needs to generate a random number to show whether they are positive or negative. In order to write this program, you need to have the following three functions used by the main function: test result (void): This function generates a test result. It should randomly return either one or zero. 1 means positive test result and 0 means negative test result. float positive percentage (int,int) : This function takes the total number of positives and the total number of tests and returns the % of positives.…Modify the above program to compute the side area, total area, and volume of a cylinder and the area and volume of a sphere, depending on the choice that the user makes. Your program should ask users to enter 1 to choose cylinder or 2 for sphere, and display an "invalid choice error" for other values. For a cylinder, we want to compute: Side area: (2*PI*r) * h Total Area: 2*(PI*r2) + Side area Volume: (PI*r2)*h For a sphere, we want to compute: Surface area: 4*PI*r2 Volume: (4.0/3.0)*PI*r3. Use overloading whenever possible. Provide comments for any functions that are overloaded and explain why they could be overloaded the program should be written in c++Modify the above program to compute the side area, total area, and volume of a cylinder and the area and volume of a sphere, depending on the choice that the user makes. Your program should ask users to enter 1 to choose cylinder or 2 for sphere, and display an "invalid choice error" for other values. For a cylinder, we want to compute: Side area: (2*PI*r) * h Total Area: 2*(PI*r2) + Side area Volume: (PI*r2)*h For a sphere, we want to compute: Surface area: 4*PI*r2 Volume: (4.0/3.0)*PI*r3. Use overloading whenever possible. Provide comments for any functions that are overloaded and explain why they could be overloaded
- Given the sample code above in generating a random number. Create a program that lets the user play the game of Rock, Paper, Scissors against the computer. The program should work as follows. 1. When the program begins, a random number in the range of 1 through 3 is generated. If the number is 1, then the computer has chosen rock. If the number is 2, then the computer has chosen paper. If the number is 3, then the computer has chosen scissors. (Don't display the computer's choice yet.) 2. The user enters his or her choice of "rock", "paper", or "scissors" at the keyboard. (You can use a menu if you prefer.) 13. The computer's choice is displayed. 4. A winner is selected according to the following rules: a. If one player chooses rock and the other player chooses scissors, then rock wins. (The rock smashes the scissors.) b. If one player chooses scissors and the other player chooses paper, then scissor wins. (Scissors cuts paper.) c. If one player chooses paper and the other player…Write a program that will check the employees years in service and office. • The user will input number for years and in service and the following offices(IT, ACCT, HR)You are working for a lumber company, and your employer would like a program that calculatesthe cost of lumber for an order. The company sells pine, fir, cedar, maple, and oak lumber.Lumber is priced by board feet. One board foot equals one square foot that is one inch thick. Theprice per board foot is given in the following table: (image 1) The lumber is sold in different dimensions (specified in inches of width and height, and feet oflength) that need to be converted to board feet. For example, a 2 x 4 x 8 piece is 2 inches wide, 4inches high, and 8 feet long, and is equivalent to 5.333 board feet (2 * 4 * 8 = 64, which whendivided by 12 = 5.333 board feet). An entry from the user will be in the form of a letter and fourinteger numbers. The integers are the number of pieces, width, height, and length. The letter willbe one of P, F, C, M, O (corresponding to the five kinds of wood) or T, meaning total. When theletter is T, there are no integers following it on the line. The program…
- The manager of Mama Calari’s Pizza Palace wants a program that calculates and displays the number of pizza slices into which a circular pizza can be divided. The manager will enter the radius of the entire pizza. For this exercise, use 14.13 as the area of a pizza slice, and use 3.14 as the value of pi. Desk-check your solution’s algorithm using 10 as the pizza’s radius; then desk-check it using 8. (Hint: For the first desk-check, the number of pizza slices should be a little over 22.)(This is a better version of an exercise from Chapter 1.) A government research lab has concluded that an artificial sweetener commonly used in diet soda pop causes death in laboratory mice. A friend of yours is desperate to lose weight but cannot give up soda pop. Your friend wants to know how much diet soda pop it is pos- sible to drink without dying as a result. Write a program to supply the answer. The input to the program is the amount of artificial sweetener needed to kill a mouse, the weight of the mouse, and the desired weight of the dieter. Assume that dietsoda contains 1/10th of 1% artificial sweetener. Use a named constant for this fraction. You may want to express the percent as the double value 0.001.this is a problem that I have how would I go about solving it? Stadium Seating There are three seating categories for a BC softball game. Class A seats cost $15, Class B seats cost $12, and Class C seats cost $9. Write a program that asks how many tickets for each class of seats were sold. Then display the total number of tickets sold, the amount of income generated from each class and the total ticket sales. Note: Use constants for the seat prices. Sample output: WELCOME TO THE BROWARD COLLEGE STADIUM!! Please enter the number of Class A seats sold: 100 Please enter the number of Class B seats sold: 200 Please enter the number of Class C seats sold: 150 ************************************************** Total number of tickets sold: 450 Income Generated: Class A:$1500.00 Class B: $2400.00 Class C: $1350.00 Total: $5250.00
- Transient PopulationPopulations are affected by the birth and death rate, as well as the number of people who move in and out each year. The birth rate is the percentage increase of the population due to births and the death rate is the percentage decrease of the population due to deaths. Write a program that displays the size of a population for any number of years. The program should ask for the following data: The starting size of a population P The annual birth rate (as a percentage of the population expressed as a fraction in decimal form)B The annual death rate (as a percentage of the population expressed as a fraction in decimal form)D The average annual number of people who have arrived A The average annual number of people who have moved away M The number of years to display nYears Write a function that calculates the size of the population after a year. To calculate the new population after one year, this function should use the formulaN = P + BP - DP + A - Mwhere N is the…Wilma Peterson is paid by the hour. She would like a program that calculates and displays her weekly gross pay. For this exercise, you do not need to worry about overtime pay, as Wilma never works more than 40 hours in a week. Desk-check your solution’s algorithm using $10 as the hourly pay and 35 as the number of hours worked; then desk-check it using $15 and 25.Problem: Write a program for computing the amount of money in a bank account at the end of each quarter for a period of one year. A quarter is equivalent to 3 months. Assume that the account is created at the beginning of a year (i.e. January 1). The year will be entered at run time through the keyboard. The account has an initial principal that is entered at run time through the keyboard. No deposit or withdrawal is made within the one-year period. The interest is compounded quarterly which means that the interest earned for the first quarter will form part of the principal for the second quarter, the interest earned for the second quarter will form part of the principal for the third quarter and so on. The annual interest rate is 5%. The interest rate for a quarter is computed by dividing the annual interest rate by 4 since there are four quarters in a year. The computational procedure (see algorithm) and the output of the program (see sample run) are shown below. The output includes…