Length Conversion Write a
Want to see the full answer?
Check out a sample textbook solutionChapter 3 Solutions
Introduction to Programming Using Visual Basic (10th Edition)
Additional Engineering Textbook Solutions
Absolute Java (6th Edition)
Starting Out with Java: From Control Structures through Objects (7th Edition) (What's New in Computer Science)
Modern Database Management (12th Edition)
Starting Out With Visual Basic (7th Edition)
Starting Out with Java: From Control Structures through Objects (6th Edition)
Concepts of Programming Languages (11th Edition)
- Convert Months Write a program that allows the user to enter a whole number of monthsand then converts that amount of time to years and months. See Fig. 3.38. The programshould use both integer division and the Mod operator.arrow_forwardQUESTION 3 3| Bachelor of Engineering (a) The length of a month varies from 28 to 31 days. In this task you are required to create a program that reads the name of a month from the user as a string. Then your program should display the number of days in that month. Display '28 or 29 days' for F'ebruary so that leap years are addressed. (b) A triangle can be classified based on the lengths of its sides as equilateral. isosceles or scalene. All 3 sides of an equilateral triangle have the same length. An isosceles triangle has two sides that are the same lengths and a third side that is a different length. If all of the sides have different lengths then the triangle is scalene. Write a program that reads the lengths of 3 sides of triangles from the user. Display a message indicating the type of the triangle. f(r) = ar? - lr - e (c) A univariate quadratic function has the form: where a, b and e are constants, and a is non-zero. The roots of a quadratic function can be found by finding the…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
- [CelsiusTemperature Table] The formula for converting a temperature from Fahrenheit to Celsius is C = 5/9 * (F - 32) where F is the Fahrenheit temperature and C is the Celsius temperature.Write a function named celsius that accepts two Fahrenheit temperatures (low and high) as arguments. The function will print a table list the Fahrenheit temperatures from low to high and the corresponding Celsuis temperatures. What is the function prototype? (assume only integers used for the temperate) void celsius (int, int); How to implement this function? The function will use a loop to convert the Fahrenheit temperatures to Celsius temperatures and display the values in the console. In the driver program, prompt for the user input for the low and high Fahrenheit temperatures. Call the the function to display the result in the console. Requirements: Use only for-loop for this exercise; Print the output in a table format Include the function prototypes before the main() All functions…arrow_forwardProblem Description: Standard telephone keypads contain the digits zero through nine. The numbers two through nine each have three letters associated with them (Fig. 1). Many people find it difficult to memorize phone numbers, so they use the correspondence between digits and letters to develop seven-letter words that correspond to their phone numbers. For example, a person whose telephone number is 686-2377 might use the correspondence indicated in Fig. 1 to develop the seven-letter word “NUMBERS.” Every seven-letter word corresponds to exactly one seven-digit telephone number. A restaurant wishing to increase its takeout business could surely do so with the number 825-3688 (i.e., “TAKEOUT”). Fig. 1: Telephone keypad digits and letters. Every seven-letter phone number corresponds to many different seven-letter words, but most of these words represent unrecognizable juxtapositions of letters. It’s possible, however, that the owner of a barbershop would be pleased to know that the…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_forward
- Q1)Use c code to create a program of vegetable ordering system. Further enhance your program above as follows (include a loop structure): • for purchase amount of RM80.00 or more, the delivery charge is waived• for purchase amount of RM100 or more, a 15% discount is given• allow data to be continuously input for more customers • After processing the last customer’s order, display a summary report of sales of the day showing details of total number of customers, a summary of each of the packages sold for the day and the total sales valuearrow_forwardQ1)Use c code to create a program of vegetable ordering system. Further enhance your program above as follows (include a loop structure): • for purchase amount of RM80.00 or more, the delivery charge is waived • for purchase amount of RM100 or more, a 15% discount is given • allow data to be continuously input for more customers • After processing the last customer’s order, display a summary report of sales of the day showing details of total number of customers, a summary of each of the packages sold for the day and the total sales valuearrow_forwardQ5) Write the code of VB program to find the age according to the birth year with its classification. The classification is adult if the age is greater than 20 years. The classification is teenager if the age equals or less than 20 and higher than 10 years. The classification is child if the age is equal or less than 10 years. The following photo demonstrates that obviously: Form Enter birth year 2000 The classification is child if the age 10 The classification is adult if the age >20 Age and its Classification adult-22arrow_forward
- Q1)Use c code to create a program of vegetable ordering system. Further enhance your program above as follows (include a loop structure): • allow data to input for more customers' name , home address and phone number. • for purchase amount of RM80.00 or more, the delivery charge is waived• for purchase amount of RM100 or more, a 15% discount is given• allow data to be continuously input for more customers • After processing the last customer’s order, display a summary report of sales of the day showing details of total number of customers, a summary of each of the packages sold for the day and the total sales value .arrow_forwardQuestion2: Write a program to determine a student's final grade for (Structure, Strength of materials, and Engineering Mathematics) indicate whether it is passing or failing. The final grade is obtained by adding the sum of the oral, attendance, and theoretical activity grades to the average of the three material. by QBasicarrow_forwardMy 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) 5arrow_forward
- C++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology PtrC++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage Learning