How to use C code 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.00 21-50 3.50 Above 50 2.00 (Figure 2) 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.
Q: Create a C function that will input 10 numbers and will perform the following 1. Display all even…
A: I give the code in C along with output and code screenshot
Q: ASSIGNMENT: Write a C program that will allow the user to enter the inner and outer radii of the…
A: Question given: A formula is given for calculate heat conduction from a cylindrical solid wall of…
Q: Write a C++ . In this program, we want to find the total cost that company X will pay for the…
A: since you have not provided the cost of normal hours(40 hours) so I have written the code only to…
Q: Question #4: Use for statement to write a C program that asks the user to enter a positive integer…
A: Code: #include <stdio.h>int main(){ //declaring required variables int n,i;…
Q: 3- Enter a=3; b=5; c=7, then clear the variable b only
A: I am using python language as no language is mentioned. We can delete/clear a variable by: del…
Q: Question #4: Use for statement to write a C program that asks the user to enter a positive integer…
A: C program for above : #include <stdio.h> int main(void) { //prompt user to enter a…
Q: b) Write complete C Program that will ask the user to enter height (Feet) and weight (Kg) of the…
A: Given: We are given a table that contains categories of people with corresponding heights and range…
Q: ASSIGNMENT: Write a C program that will allow the user to enter the inner and outer radii of the…
A: the answer is given below :
Q: 2 Write and briefly explain a C code to help out a company. The company packs its product in boxes…
A: It is defined as a powerful general-purpose programming language. It can be used to develop software…
Q: Q.1 - manufacturer wishes to determine the cost of producing an open-top cylindrical container. The…
A: #include <stdio.h> int main() { //declaring variables float…
Q: Q1: Write a C++ program to calculate the volume of a pyramid. Users are required to enter the…
A: Formula Used in Program: 1. Triangular ( triangular base) : Formula - : (1/6) * a * b * h 2. Square…
Q: Construct a C code to compute, to display the sum of five (5) integer numbers and determine the…
A: 1. create array of 5 integers 2. declare and initialize sum = 0 3. loop from 0 to 5 add array…
Q: B- Write C++ statement to accomplish each of the following. 4. Assign the sum of x and y to z and…
A: 4. Assign the sum of x and y to z and increment the value of x by I after the calculation.…
Q: Q2 Write a C++ program to calculate commission for the salesmen. The commission is calculated…
A: Program objective: - To find the sales commission according to the given data. Algorithm: - Start…
Q: Question #4: Use for statement to write a C program that asks the user to enter a positive integer…
A: required:
Q: Rolling Two Dice (in c language) Write a program that simulates the rolling of two dice. The program…
A: A required program is as follows, #include<stdio.h> #include<time.h>…
Q: The table below shows the AZA Travel Tour ticketing price: Package b) c) d) Istanbul Beijing Tokyo…
A: Step 1: Start Step 2: take input of package code Step 3: validate package code if valid continue…
Q: Use for statement to write a C program that asks the user to enter a positive integer number n. Then…
A: From the sequence, it is clear that the numbers getting decreased by 3 and continued till 0
Q: Write complete C Program to compute the patient's Bill for a Hospital. Hospital categorizes the…
A: Please find the answer below :
Q: Question #4: Use for statement to write a C program that asks the user to enter a positive integer…
A: #include <stdio.h> int main() { int num,j=0; printf("\n enter the number"); scanf("%d",…
Q: Q2)- Choose the correct statement 1- To change the text x to capital letters, use the function : a)…
A: Lcase is a function in Visual Basic is used to convert a string to lower case Ucase is a function in…
Q: 2. Use a structure called Time to write a C++ program that asks the user to enter a time value in…
A: STRUCT is a C++ data structure that is created to store together elements of different data types.…
Q: Q3) Suppose two point coordinates say (x1.yl) and (x2.y2), write a C++ program asks the user to…
A: Note: only one question is permitted in compliance with the BNED Guidelines. If you would like a…
Q: Please use C++ and Only Use Selection Statements PROBLEM: Consider the elevator in the Faculty of…
A: I have provided C++ CODE along with CODE SCREENSHOT and TWO OUTPUT…
Q: 2.15 LAB: Using math functions Given three floating-point numbers x, y, and z, output x to the power…
A: Given:
Q: 3. The C++ statement that displays the values of two float numbers x and y, each in a field length…
A: the function setw is used to set the field width to be used for output operations. It takes…
Q: The table below shows the Package Istanbul Beijing Tokyo b) c) d) Pavel Tour ticketing price:…
A: Code : #include<iostream>using namespace std;int main(){ double totalPrice=0;…
Q: Q1) How to use C code to write a C program segment to prompt a user for entering an integer and save…
A: use while infinite loop to display warning message until user choose option as 1 , 2 or 3.
Q: 1. Evaluate each of the following postfix expressions. Assume that a = 2, b = 3, c = 4, d = 5, and e…
A:
Q: C program: The user should enter a number and then the next consecutive numbers are printed in. How…
A: The user should enter a number and then the next consecutive numbers are printed in. How would I…
Q: Using c++ write a program : The most common symptoms of COVID-19 are fever, dry cough, and…
A: Here I have first of all declared character type variable to store the status. Now I have used a…
Q: B- Write C+ statement to accomplish each of the following. 4. Assign the sum of x and y to z and…
A: z=x++ + y;
Q: Q1/ Using the concept of functions, write C++ program to convert cartesian coordinates (x, y, z) to…
A: Q1A, C++ code #include <iostream>#include <math.h>using namespace std; int main(){ //…
Q: 21: Write a C++ program to calculate the diagonal of a rectangle. Users are required to enter Ehe…
A:
Q: Using C++ write a program Asif buys four products detergent, ghee, milk and soap from Punjab Cash &…
A: Algorithm: Firstly collect the data form the user about the price and quantity then store the total…
Q: C- Write C++ statement to accomplish each of the following. 7. Dečlare variables sum and x to be of…
A: //Importing library#include <iostream>using namespace std;//Main of the codeint main(){ //7th…
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: 2.15 LAB: Using math functions Given three floating-point numbers x, y, and z, output x to the power…
A: NOTE - As per the guidelines we can only answer one question in multi questions, so please repost…
Q: 1. Evaluate each of the following postfix expressions. Assume that a = 2, b = 3, c = 4, d = 5, and e…
A: If we mоve the орerаtоrs аfter the орerаnds then it is knоwn аs а роstfix…
Q: C++ Ex: Write a program to receive an arithmetic operator and two integers, the program performs the…
A: Find Your Code Below
Q: main.c 2. Hide and Seek (Integral) by Catherine Arellano #include 2 #include"decimalPos.h" Your…
A: Paste the code that i provide below #include"decimalpos.h" or at the bottom of decimalpos.h file.…
Q: Q/ A College of engineering is advertised to call high school graduates to apply to its departments…
A: Problem Statement: A College of engineering is advertised to call high school graduates to apply to…
Q: Q2: Write a C++ program to compute the value in the "result" variable. For calculation of the result…
A: #include<bits/stdc++.h>using namespace std;int main(){ float a,b,c,r; float result;…
Q: Malcolm Movers charges a base rate of $200 per move plus $150 per hour and $2 per mile. Write a…
A: using System;using System.Collections;using System.Globalization; using static System.Console;…
Q: Q1) Suppose (x1,y1) and (x2,y2) represents left lower corner and right upper corner of a rectangle…
A: If all the coordinates are positive, rectangle lies in Q1 If x coordinates are positive and y…
Q: Use c code to write a C program that reads a body temperature as 1 (greater and equal to 37 Celsius)…
A: Here we need to use nested switch statement.
Q: Q1: Write a C++ program to calculate the volume of a pyramid. Users are required to enter the…
A: the answer is given below:-
Q: Problem #2: [50 pts] Write a program that calculates the net salary after tax deduction according to…
A: Code and output is given in step2
Q1) How to use C code 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.00 21-50 3.50 Above 50 2.00 |
(Figure 2)
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.
Step by step
Solved in 2 steps with 3 images
- (Civil eng.) Write an assignment statement to determine the maximum bending moment, M, of a beam, given this formula: M=XW(LX)L X is the distance from the end of the beam that a weight, W, is placed. L is the length of the beam.(Civil eng.) Write a C++ program to calculate and display the maximum bending moment, M, of a beam that’s supported on both ends (see Figure 3.8). The formula is M=XW(LX)/L, where X is the distance from the end of the beam that a weight, W, is placed, and L is the beam’s length. You program should produce this display: The maximum bending moment is xxxx.xxxx The xxxx.xxxx denotes placing the calculated value in a field wide enough for four places to the right and left of the decimal point. For your program, assign the values1.2,1.3,and11.2toX,W,andL.Domino's Time Function Name: dominosTime() Parameters: N/A Returns: None Description: During the summer, you ordered a lot of food from Domino's. Pizzas are $12, an order of pasta is $6, and chicken wings are $8. Write a function that asks the user how many of each food item they would like, and then print a response telling them what their order to- tal will be. The order total should be an integer. >>> dominosTime() How many pizzas do you want? 3 How many orders of pasta do you want? 2 How many orders of chicken wings do you want? 2 By ordering 3 pizzas, 2 orders of pasta, and 2 orders of chicken wings, your order total comes to $64.
- The company discounted used cars pays their employees according to this chart: 250$ per months plus 50$ per car sold. If the salesman sells more than 10 cars, the employee receives a bonus of 5% of the total of his sales, in addition to his regular salary.Each month, the owner sits in front of the computer, and enters the following information: The name of the employee, the number of cars sold, as well as the total of all the sales for the month. algorithm that will calculate the salary of an employee for the month, and then display on the screen, his name, total cars sold, base salary, bonus if applicable and entire salaryuse C++ programming language Write a program that computes and displays the charges for a patient’s hospital stay. First, the program should ask if the patient was admitted as an inpatient or an outpatient. If the patient was an inpatient, the following data should be entered: The number of days spent in the hospital The daily rate Charges for hospital services (lab tests, etc.) Hospital medication charges If the patient was an outpatient, the following data should be entered: Charges for hospital services (lab tests, etc.) Hospital medication charges Use a single, separate function to validate that no input is less than zero. If it is, it should be reentered before being returned. Once the required data has been input and validated, the program should use two overloaded functions to calculate the total charges. One of the functions should accept arguments for the inpatient data, while the other function accepts arguments for outpatient data. Both functions should return the…PROGRAM LANGUAGE C PROGRAM In a course with 2 midterms and 1 final exam, you will write a code that determines the remainder and passer. The program will first say "Please enter the 1st midterm grade:" and when you enter from the keyboard, it will ask for the second exam and then the final grade. The effect of the first midterm grade will be 25%, the effect of the second visa grade will be 25% and the effect of the final exam will be 50%. If these three exams are calculated with the percentages given, the result will be "Passed the Course!" If it is 50 and above, and if it is below 50, "Failed from the Course" will be written. Sample; Enter the 1st visa grade: 50 2.Enter visa grade: 50 Enter your final grade: 50 Visitors: 50 Passed the lesson
- My Solutions > FA2.1.1 Longest Word Write a function named longestword that is use to compare words from the string vector named as word. The user will input the string vector word and the function will return the value of variable longest, the word with the most number of characters (and the first in the list when they have the same length). Sample Output: >>>longestword("Heat","Lakers","Warriors") Warriors Note: The following are the matlab functions that you can use in your script: length=use to return the number of elements in a string vector. strlength=use to return the number of characters in string Function e A Save C Reset I MATLAB Documentation 1 % Use if-elseif-else statement Code to call your function e C Reset 1 word=["cent", "centennial","century"]; 2 longestword(word) 3 word=["love", "care","joy"]; 4 longestword (word) 5COMPUTER AND INFORMATION SCIENCES INTRODUCTION TO PROGRAMMING ASSIGNMENT 1 The salary scales of workers in an institution are taken as input. The workers get paid as per the following rules: Scale 1: Salary is 10,000 KES. Scale 2: Salary is 15,000 KES. Scale 3: Salary is 20,000 KES. Using appropriate control structure, write a program to display salary at different scales. 2 Write a program to calculate the salary as per the following table: Years of Service Qualifications Salary <10 Post-Graduate 15000 10 Graduate 10000 <10 Post-Graduate 10000 10 Graduate 7000 3 State and explain primary Data types used in C programming1. Lulu Hypermarket wants you to create a program that they can use to compute for the discounts to be given to Lulu card holders. The program should read the user to enter the name of the customer and the number of purchases. The number of purchases will serve as the counter for the number of times purchase amount will be entered by the user. The program should be able to count the number of purchase amounts in each of the following ranges: • 1 to 30 • Above 30 The program should also compute the sum of all the purchase amounts. A discount is computed based on the sum of the purchase amount. If the sum of the purchase is more than 500, the discount is 2.5% of the sum; otherwise, the discount is 5% of the sum. Display an appropriate output. Python 3
- Remaining Time: 54 minutes, 49 seconds. * Question Completion Status: QUESTION 19 Write a Java program that prompts the user to enter the School Grade Level of a student and then calculate their discount amount in the regular fees structure offered during this pandemic situation. By using the below table, calculate their discount amount from the amount of the regular fee and then print the discount amount in OMR by using the appropriate selection structure. (Assume the user is entering a maximum Grade level is 12) discount amount = Regular Fees * percentage of discount rate School Grade Level Regular Fees in OMR Discount Rate >9 and 6 and 3 and 0 and <=3 30.500 5% otherwise 20.400 No discount T T T Arial 3 (12pt) v T -E E- 只i ン Click Save and Submit to save and submit. Click Save All Answers to save all answers. Save All Answers TOSHIBA F5 F6 F7 F8 F9 F10 F11 F12 INS SCNULL LOCK AD & 67 7 V 8A9 4 0METHODOLOGY A bookstore owner wants you to write a program that calculates the gross pay of an employee. The input to the program is the number of hours the employee works in one week and the employee’s hourly pay rate. The program is to calculate the employee’s gross pay including the possibility of overtime pay. Regular pay is the number of hours the employee worked (up to 40 hours) times the hourly rate. The program is to compute an overtime pay if the employee worked more than 40 hours. All hours beyond 40 should be multiplied to 1.5 for the OT differential pay The program should output the worker’s regular pay, overtime time, and the gross pay (sum of the regular pay and overtime pay). Create an IPO and flowchartBackground: Game Rules The rules to the (dice) game of Pig: You will need 2 dice. To Play: a. The players each take turns rolling two die. b. A player scores the sum of the two dice thrown (unless the roll contains a 1): If a single number 1 is thrown on either die, the score for that whole turn is lost (referred to as “Pigged Out”). A 1 on both dice is scored as 25. c. During a single turn, a player may roll the dice as many times as they desire. The score for a single turn is the sum of the individual scores for each dice roll. d. The first player to reach the goal score wins unless a player scores higher subsequently in the same round. Therefore, everyone in the game must have the same number of turns. Execution and User Input This program is quite interactive with the user(s) and will take in the following information; please review the sample input / output sessions for details; we describe them again here emphasizing input. The program will prompt for the number of…