Uploaded by Nimesh Rangana

Tutorial 01

advertisement
Tutorial 01
1. Using a for loop to display the price aligned with quantity as in below table. Consider
price of a pen drive as Rs.1000.00
Quantity
10
20
30
40
50
Price(Rs)
10000
20000
30000
40000
50000
2. Display the table given in question 1,
a. Using while loop
b. Using do-while loop
3. Declare a variable to hold the value 20.
a. Count down from 20 to 0.
b. If the number is an even number, then print “Even”, otherwise print “Odd” in
front of the countdown number
Download