The document outlines a series of programming assignments that require the creation of programs for basic arithmetic operations, including addition, subtraction, multiplication, division, modulus, squaring, cubing, converting minutes to seconds, calculating simple interest, and finding the perimeter of a rectangle. Each assignment specifies the inputs needed and the expected output. The tasks are designed to enhance programming skills through practical applications of mathematical concepts.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
4 views2 pages
Calculations
The document outlines a series of programming assignments that require the creation of programs for basic arithmetic operations, including addition, subtraction, multiplication, division, modulus, squaring, cubing, converting minutes to seconds, calculating simple interest, and finding the perimeter of a rectangle. Each assignment specifies the inputs needed and the expected output. The tasks are designed to enhance programming skills through practical applications of mathematical concepts.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2
Assignment
1. Addition of Two Numbers
Write a program that: • Takes two numbers as input. • Calculates and displays their sum.
2. Difference of Two Numbers
Write a program that: • Takes two numbers as input. • Calculates and displays their difference.
3. Product of Two Numbers
Write a program that: • Takes two numbers as input. • Calculates and displays their product.
4. Division of Two Numbers
Write a program that: • Takes two numbers as input. • Calculates and displays the result of dividing the first number by the second. (Assume the second number is non-zero.)
5. Remainder (Modulus) of Two Numbers
Write a program that: • Takes two numbers as input. • Calculates and displays the remainder when the first number is divided by the second. 6. Square of a Number Write a program that: • Takes a number as input. • Calculates and displays its square.
7. Cube of a Number Write a program that: • Takes a number as input. • Calculates and displays its cube.
8. Convert Minutes to Seconds
Write a program that: • Takes a number of minutes as input. • Converts it to seconds and displays the result.
9. Calculate Simple Interest
Write a program that: • Takes the principal, rate of interest, and time as input. • Calculates and displays the simple interest using the formula:
10. Perimeter of a Rectangle
Write a program that: • Takes the length and width of a rectangle as input. • Calculates and displays the perimeter using the formula: