

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
This assignment was given by Dr. Jyoti Lokesh at Biju Patnaik University of Technology, Rourkela for Computer Programming course. It includes: Character, Keyboard, Capital, Letter, ASCII, Program, Positive, Integer, Input, Data, List
Typology: Exercises
1 / 2
This page cannot be seen from the preview
Don't miss anything!


MAJU | Computer Programming CS1123 |Spring 2012 | Assignment
1
NOTE: Carefully read instructions given at the end of assignment before solving it.
The following table shows the range of ASCII values for various characters.
Characters ASCII Values A – Z 65 – 90 a – z 97 – 122 0 – 9 48 – 57 Special Symbols 0 – 47, 58 – 64, 91 – 96, 123 - 127
Display a menu in main( ) which will show the following options: a. Absolute b. Remainder c. Cube d. ASCII Value
MAJU | Computer Programming CS1123 |Spring 2012 | Assignment
2
e. Maximum f. Minimum
Your task is to write switch case definitions for the above tasks. Use built-in functions. You have to use switch case for making the menu. The task of operation is given below:
Absolute: it will take a number from user and computes the absolute value.
Remainder: it will take two numbers from user and calculate the remainder when the greater number is divided with the smaller number and displays the result.
Cube: it will take a number from user and computes the cube of that number.
ASCII_Value: It will take a character from user and computes the ASCII value of the character.
Maximum: Function will take three numbers from user and computes the maximum number and displays the result.
Minimum: it will take three numbers from user and computes the minimum number and displays the result.
Sample Input Sample output 13414 Sum = 13 95411 Sum = 20