1. Draw the Flowchart and Write the Program to Calculate the Area of 15 Rooms. the Length
Total Page:16
File Type:pdf, Size:1020Kb
1. Draw the Flowchart and write the program to calculate the area of 15 rooms. The length is 55.2meters, and breadth is 26.34meters.
Flowchart
Program #include 2. You have been given a job as a programmer on a Software company. In order to accomplish some calculations, you need to know how many bytes the following data types use: char, int, float and double. You do not have manuals, so you can’t look this information up. Write a C++ program that will determine the amount of memory used by these types and display the information on the screen. #include Algorithm Step 1: Start Step 2: Set petrol=60,distance=350 Step 3: Calcultae MPL=distance/petrol Step 4: Print MPL Step 5: Stop Program #include 4.Write the algorithm and C++ program to convert from inches to meters Hint: 1 inch = 0.0254 meters Algorithm Start Step 1: Read inches Step 2: meters=0.0254*inches Step 3: Display the meters Stop Program #include Algorithm Step 1: Start Step 2: Set MPLtown=21.5, MPLhway=26.8, petrol=20 Step 3: Calculate distancet=petrol*MPLtown Step 4: Calculate distanceh=petrol*MPLhway Step 5: Print the distancet Step 6: Print the distanceh Step 7: Stop Program #include 6..Modify the following program so it prints two blank lines between each lines of text. #include Answer #include 8. Draw the flowchart and write the C++ program to calculate the pay of employee (for one day) based on the hour basis. Hint: pay= Amount Per Hour*Number of Hours Worked Flowchart Program #include