(Diameter, Circumference and Area of a Circle) Write a
Learn your wayIncludes step-by-step video
Chapter 2 Solutions
C How to Program (8th Edition)
Additional Engineering Textbook Solutions
Introduction To Programming Using Visual Basic (11th Edition)
Software Engineering (10th Edition)
Concepts of Programming Languages (11th Edition)
Objects First with Java: A Practical Introduction Using BlueJ (6th Edition)
Starting Out with Programming Logic and Design (4th Edition)
Java: An Introduction to Problem Solving and Programming (7th Edition)
- Hi! I need help with this homework! (it is C prgramming ) Thank youarrow_forward"if..else if statement usually is used for multiple selection. Develop a simple calculator using "if...else if statement in C to calculate the addition, the subtraction, the multiplication and the division of two float values entered by the users. The users must have the choice on which calculation they wish to perform.arrow_forward5. (Algebra: solve 2 X 2 linear equations) You can use Cramer's rule to solve the following 2 X 2 system of linear equation: ax + by = e cx + dy = f ● x = ed - bf bc ad y = af - ec ad bc - Write a program that prompts the user to enter a, b, c, d, e, and f and display the result. If ad- bc is 0, report that The equation has no solution. Enter a, b, c, d, e, f: 9.0, 4.0, 3.0, -5.0, -6.0, -21.0 Enter x is -2.0 and y is 3.0 Enter a, b, c, d, e, f: 1.0, 2.0, 2.0, 4.0, 4.0, 5.0 Enter The equation has no solutionarrow_forward
- a) Given the following if-else statement. Convert this statement to a ternary operator. if ( x > 10 && y < 20) Z = a + b; else Z = a - b; b) The square of a number is given as N2. For example, if N = 5, the square is 5 × 5 = 25. Write a complete C program that computes the square of any given N and displays the answer as "The square of N is P'. (where N is the value entered by the user and F is the computed square value). Prompt the user to obtain the value of N. c) Write the appropriate C code to do the following; ) Declare X and Y as integers, and Z as double precision floating point mbers. i) Read the values of X and Y from the keyboard. iii) Divide X with Y and assign it to z iv) Print the value of Z to the screen with 3 decimal places. v) Using a single statement, print the value of Z to the nearest integer.arrow_forwardPlease take screenshots of the stops. (Science: calculating energy) Write a program that calculates the energy needed to heat water from an initial temperature to a final temperature. Your program should prompt the user to enter the amount of water in kilograms and the initial and final temperatures of the water. The formula to compute the energy is Q = M * (finalTemperature – initialTemperature) * 4184 where M is the weight of water in kilograms, temperatures are in degrees Celsius, and energy Q is measured in joules.arrow_forwardChange Return Program: (Write a python program for the following) The user enters a cost and then the amount of money given. The program will figure out the change and the number of twenty-dollar bills, ten-dollar bills, five-dollar bills, single-dollar bills, quarters, dimes, nickels, pennies needed for the change. You must have the maximum amount of higher denominations possible before allowing for lower denominations. For example, If your change is $18.88, You must have One Ten-dollar bill, One Five-dollar bill, Three singles, Three quarters, One dime and three pennies. There should be no nickels; No three Five-dollar bills etc.arrow_forward
- 4) Write a program that asks the user for an angle, entered in degrees. The program should then display the sine, cosine, and tangent of the angle. (Use the sin, cos, and tan library functions to determine these values.) You must convert the angle into radians (angle * 3.14/180)arrow_forwardQ1) Write a program that takes as input any change expressed in Saudi Riyals. It should then compute the number of 500s, 100s, 50s, 10s, 5s and Riyals notes to be returned. For example, 6897 Riyals should be returned as following: 13 - 500 notes, 3– 100 notes, 1– 50 note, 4 – 10 notes, 1 - 5 note and 2 riyal notes. (30%) Example of the output should be as following: run: Enter the amount of money in Riyals: 6897 Number of 500 notes is : 13 Number of 100 notes is : 3 Number of 50 notes is : 1 Number of 10 notes is : 4 Number of 5 notes is : 1 Number of 1 notes is : 2 BUILD SUCCESSFUL (total time: 8 seconds) Hint: think of using the arithmetic operation (%)arrow_forwardPlease answer item number 3. (pyhthon programming)arrow_forward
- Parking Charges) A parking garage charges a $2.00 minimum fee to park for up to threehours and an additional $0.50 per hour for each hour or part thereof over three hours. The maximumcharge for any given 24-hour period is $10.00. Assume that no car parks for longer than 24 hoursat a time. Write a program that will calculate and print the parking charges for each of three customers who parked their cars in this garage yesterday. You should enter the hours parked for eachcustomer. Your program should print the results in a tabular format, and should calculate and printthe total of yesterday's receipts. The program should use the function calculateCharges to determine the charge for each customer. Your outputs should appear in the following format:Car Hours Charge1 1.5 2.002 4.0 2.503 24.0 10.00TOTAL 29.5 14.50arrow_forwardQ1/an A-Write a program to compute the drag force F, (in Newton) When a body swims through fluid, the drag force is given by 1 F =PV ²ACD Take Matlab p= 1000 kg/m3 is the density of fluid, V = 1.25 (m/s) is the swimming speed, A=0.25 m² is the frontal area of the body, Cp=0.09 is the coefficient of dragarrow_forward[Calculate grades’ average for a student] write a program that calculates the student grades’ average for a semester for the number of courses taken in that semester. Your program should do the following: 1.Read from user the number of courses (n) 2. Then, read the courses’ grades for n times (Hint: use a loop) 3.If a grade is grater than 100 or less than 0, ask the user to enter the grade again. 4.Calculate the average of grades using the following formula: average = (sum of grades) / n 5.Print out the average grade on the screen. Note: Always use appropriate data types.arrow_forward
- C++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology Ptr