1:28 x BEK1013_Assignment-1_ma... mark Answer the following questions. Whenever relevant, show the C++ code and screensh

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

1:28 x BEK1013_Assignment-1_ma... mark Answer the following questions. Whenever relevant, show the C++ code and screensh

Post by answerhappygod »

1 28 X Bek1013 Assignment 1 Ma Mark Answer The Following Questions Whenever Relevant Show The C Code And Screensh 1
1 28 X Bek1013 Assignment 1 Ma Mark Answer The Following Questions Whenever Relevant Show The C Code And Screensh 1 (94.73 KiB) Viewed 15 times
1:28 x BEK1013_Assignment-1_ma... mark Answer the following questions. Whenever relevant, show the C++ code and screenshot of the console output. 1. Rewrite the following program to conform to good programming practice and correct syntax: #include Using namespace Std. Int main ( > (count >> "Kuala Lumpur is the capital city /n"; cout << "of Malaysia.\n"; cout co Int numl cin << "How many states are there in Malaysia?" >> numl cout >> "Number of states: ">> numl; } 2. For a 10.6, b-13.9, and c- -3.42. Determine the following values: (a) int (a + b) (b) int (a) +b+c (c) float (int (a)) + b (d) float (int (a+b)) (e) abs (a) + abs (b) 3. Each disk drive in a shipment is stamped with a code from 1 through 4 to indicate the manufacturer, as follows: Code Disk Drive Manufacturer 1 3M Corporation 2 Maxell Corporation 3 Sony Corporation Verbatim Corporation 4 Write a C++ program that accepts the code number as input and, based on the value entered displays the correct disk drive manufacturer. 4. Write a program that calculates and displays values for y where y-xz/(x-2) Your program should calculate y for values of x ranging between 1 and 5 and values of z ranging between 2 and 6. The x variable should control the outer loop and be incremented in steps of 1, and should be incremented in steps of 1. Your program should also display the message "Function undefined" when the x and values are equal. end -
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply