
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Instructions and examples for a programming assignment, including tasks such as finding the smallest number, calculating sum and percentage, swapping values, and performing arithmetic operations based on user input. The deadline for submission is december 22, 2011, before 11pm.
Typology: Exercises
1 / 1
This page cannot be seen from the preview
Don't miss anything!

Take three numbers and print the smallest using any of the if statement. If neither number is smallest then print that numbers are equal
Take FOUR variables, 1st^ for name, 2nd^ for English marks, 3rd for physics marks and 4 th for introduction to computing marks. Take values in these variables from user. Then calculate the sum and percentage. Then after printing the above all things Suppose user enters 80, 70, 80 then your output will looks like this Enter name xyz Enter English marks 80 Enter physics marks 70 Enter introduction to computing marks 80 Marks in English is 80 Marks in physics is 70 Marks in introduction to computing is 80 Sum is 230 Percentage is 76
Take two values as input from user. Swap the two values by using third variable. Suppose user enter 1 for 1st^ value and 2 for 2nd^ value. Output should be: Enter 1st^ value Enter 2nd^ value First value is 2 Second value is 1
Take two integer type values from user. Take operator of character type as input from user. If user enters +, perform addition of the above two integer type inputs. If user enters - , perform subtraction of the above two integer type inputs. If user enters *, perform multiplication of the above two integer type inputs else perform division of the above two integer type inputs. Deadline: 22 December 2011 before 11pm Copy cases will be given zero marks. Those who have used same logics will also be given zero marks. Good luck