Friday, September 12, 2014

Using printf() and scanf()...


1. Use the printf( )  statement and do the following:

a)    Print out the value of the integer variable sum
b)  Print out the text string "Welcome", followed by a new line.
c)  Print out the character variable letter
d)  Print out the float variable discount
e) Print out the float variable dump using two decimal places


2. Use the scanf( )  statement and do the following:

a) To read a decimal value from the keyboard, into the integer variable sum

b) To read a float variable into the variable discount_rate

c)Print the wth Values of the characters ‘A’ and ‘b’.



No comments:

Post a Comment