Jump to content
Sign in to follow this  
karmaepic

Please Help

Recommended Posts

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.
B) 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.
(B) The complete C source code.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...