In the following exercises, write a
Write a program that allows the user to enter a whole number of inches and then converts that length to feet and inches. See Fig. 3.39. The program should use both integer division and the Mod operator.
Want to see the full answer?
Check out a sample textbook solutionChapter 3 Solutions
Pearson eText for Introduction to Programming Using Visual Basic -- Instant Access (Pearson+)
Additional Engineering Textbook Solutions
Starting Out with C++: Early Objects
Starting out with Visual C# (4th Edition)
Introduction to Java Programming and Data Structures, Comprehensive Version (11th Edition)
Java: An Introduction to Problem Solving and Programming (8th Edition)
Starting Out with Python (4th Edition)
Objects First with Java: A Practical Introduction Using BlueJ (6th Edition)
- Growth of an Investment Suppose a fixed amount of money is deposited at the beginning of each month into an investment paying 6% interest compounded monthly. After each deposit is made, [new balance]=1.005∗[previous balance one month ago]+ [fixed amount]. Write a program that requests the fixed amount of the deposits as input and displays the balance after each of the first four deposits. See Fig. 5.14.arrow_forwardWEEK 4- EXERCISES 1: Write a program that will calculate your electric bill. You are to input the number of kilo-watt hours (kwh) used in a 30 day billing period. Electricity costs 0.0672 TL per kwh for daytime, 0.1127 TL for peak time and 0.03679 TL for night time. A state tax of 12% and a city tax of 4.5% are also added to the bill. IF the total of all periods are bigger than 500 kWh, the the cost per kWh will be 0.2719 TL Write a program that accepts the number of hours used per period, along with your Electricity Number (6 Digits), social ID number, zip code, telephone area code and telephone number. The program is to print a display with the following layout: Please enter your first letter of Name Please enter your first letter of Surname Please enter your Electricity Number Please enter your Phone Area Code Please enter your Phone Number Please enter total day-time kW in a month Please enter total peak-time kW in a month Please enter total night-time kW in a month :T :0 : 1026897…arrow_forward25. Repeat Programming Exercise 24, but the wire is to be bent in the form of a circle. In this case, the user specifies the length of the wire and the program outputs the radius and area of the circle. (You may assume that . Also declare it as a named constant.)arrow_forward
- Price-to-Earnings Ratio Request a company’s earnings-per-share for the year and the price of one share of stock as input, and then display the company’s price-to-earnings ratio (that is, price/earnings). See Fig. 3.25.arrow_forwardThe current year and the year in which employee joined the organization are entered through keyboard. If number of years employee serve in organization is more than or equal to 3, then the bonus of the 30% of the basic salary is given to employee. Write a program to display bonus given to employee.arrow_forwardC Language - Given a highway number, indicate whether it is a primary or auxiliary highway. If auxiliary, indicate what primary highway it serves. Also indicate if the (primary) highway runs north/south or east/west.arrow_forward
- Question 3 (12 Points) of laps that they have run around a racetrack. Then, prompt the user to enter the time of each lap (in minutes). The program should calculate and display the fastest lap and the average lap time of all laps.arrow_forwardExercise 5: Part I Use of different controls and functions 1. Program to find sum, minimum, maximum, average using radio buttons 2. Program to show length of string 3. Program to show hobbies of people using check box 4. Program to display cities of Oman in combo box 5. Write a program to calculate the numbers of years the employee is working (hint use two datetime Picker, 1 label, and 1 button and datediff function) 6. Program to change the color of form on select of radio button 7. Design a registration form using all controlsarrow_forwardMake a flowchartarrow_forward
- Flow chart and peseudocode of Get the name of the student A. If the student is regular, get his/her section. Then display his/her name and section B. If the student is irregular, get his/her course. Then display his/her name and course.arrow_forwardQ3. Write an algorithm and draw a flow chart to get student level and CGPA as input and check if student level is "Diploma Second Year" and CGPA is more than equal to 2.5 eligible display "Eligible for Advance Diploma" otherwise display "Not Eligible for Advance Diploma". If Student Level is "Advanced Diploma" and CGPA is more than equal to 2.75 then Display "Eligible for Bachelor" otherwise Display "Not Eligible for Bachelor"arrow_forwardQUIZ 01 bmi = weight/ (height x height); As a programmer, you're required to develop a program to calculate Body Mass Index (BMI) using equation in Fig.1 and Fig. 2. The output is required to be exactly as in Fig. 3 Fig.1. Equation for BMI CATEGORY BMI Please provide the complete flowchart & the C program code. Underweight 17.6 to 18.5 Ideal 18.6 to 24.9 Overweight 25 to 25.9 Obese 30 to 30,9 Fig.2. BMI category Expected Output for the Input User Input: Enter height in meter 1.4 Enter weight in kg 60 Output: Your Body Mass Index (BMI) is 30. 61 Your BMI category is: Obese Fig.3. Expected output of the C programarrow_forward
- C++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage LearningC++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology Ptr