SKR 3306 Lab 02-Assignment 2-Cal
SKR 3306 Lab 02-Assignment 2-Cal
Lab Assignment 2
1. Write a program that used un!tion pro!edures to as" the user to enter t#o
numbers$ obtains the t#o numbers rom the user and prints the sum$ produ!t$
dieren!e$ and %uotient o the t#o numbers.
2. Write a program that used un!tion pro!edures to as" the user to enter t#o
integers$ obtains the numbers rom the user$ then prints the &arge number o&&o#ed
b' the #ord (is &arger.) * the numbers are e%ua&$ print the message (+hese
numbers are e%ua&.)
3. Write a program that used un!tion pro!edures to inputs three integers rom the
"e'board and prints the sum$ a,erage$ produ!t$ sma&&est and &argest o these
numbers. +he s!reen dia&og shou&d appear as o&&o#-
.. Write a program that used un!tion pro!edures to reads an integer and determines
and prints #hether it/s odd or e,en.
0. Write a program that used un!tion pro!edures to reads in t#o integers and
determines and prints i the irst is a mu&tip&e o the se!ond.
6. Write a program that used un!tion pro!edures to inputs a i,e1digit integer$
separates the integer into its digits and prints them separated b' three spa!es ea!h
that &oo"s &i"e the o&&o#ing.
2. Write a program that !a&!u&ates the s%uares and !ubes o the integers rom 0 to 10.
3se tabs to print the o&&o#ing neat&' ormatted tab&e o ,a&ues-
4. Create a 56* 75od' 6ass *nde89 !a&!u&ator app&i!ation that reads the user/s
#eight in "i&ograms and height in meters$ then b' using a un!tion pro!edure to
!a&!u&ates and disp&a's the user/s bod' mass inde8.
weightInKilograms
BMI
heightInMeters heightInMeters
=