karmaepic 0 Report post Posted March 5, 2010 Saye cuma mahu guide dari anda sahaja, apa langkah-langkah yang perlu dilakukan , SOLSIS Sdn. Bhd. are going to buy computers for their new laboratories. One of the computer companies would like to give discounts based on the total purchased as the followings. Total purchased Discount > RM 100,000 35% > RM 50,000 to < = 100,000 25% > RM 20,000 to < = 50,000 10% <= 20,000 No discount Calculate and print the total purchased, total discount and total amount to be paid. The user will input the number of computers that they would like to buy. The price of each computer is RM5000. (Assumption: The values entered always positive.) Based on the problem given, you are requires to: (a) Draw a flow chart. Develop a C program. (2) Develop a program that will prompt the user to input the radius and height of a cylinder in integers. If the given radius or height is in negative value, display the message “The radius and height value should not be in negative value”, else prompt the user to enter the character ‘A’ or ‘V’. If the character ‘A’ is given, the program will calculate and display the cylinder’s surface area, else if the character ‘V’ is given, the program will calculate and display the cylinder’s volume. If the user enters the value other than ‘A’ or ‘V’, message “The input is invalid” will be displayed. If the cylinder’s volume is larger than 500 cubic units, inform the user that the cylinder is too big. The formulas for cylinder’s area and volume are given below: area = 2pr 2 + 2prh volume =pr 2h where p represents pi (3.142), r represents the cylinder’s radius, and h is the cylinder’s height. The pi value should be declared as a constant. The above problem requires you to produce: (a) The flowchart for the program. ( The complete C source code. Quote Share this post Link to post Share on other sites