Assignment 1

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

Assignment # 1

Course: Introduction to Computing

Semester: FALL 2020

Topics: cin, cout, variables, arithmetic expressions

Due Date & Time: Tuesday 3rd November, 2020


& 12:00 PM
Question 1: Write a C++ program that will print the complete table of 5 & 6 on the console. The
out put format is as follows:
5x1=5 6x1=6
5 x 2 = 10 6 x 2 = 12
. . . . . .
. . . . . .
5 x 10 = 50 6 x 1 = 60

Question 2: Write a C++ program that will print the following shapes on the console with simple
cout statements.
Question 3: Fill the following table as we did in class. The table values should be updated by
evaluating statement # 9 to statement # 13 from the following code.

After Statement # Variables


9 var1 = var2 = var3 = var4 =
10 var1 = var2 = var3 = var4 =
11 var1 = var2 = var3 = var4 =
12 var1 = var2 = var3 = var4 =
13 var1 = var2 = var3 = var4 =

Question 4: Write a C++ program that will take 2 numbers from user and prints the sum and
multiplication result on the console.
The program output should be:
For Example:
Enter Number 1: 34
Enter Number 2: 12
The Sum of 34 and 12 is 46.
The multiplication result of 34 and 12 is 408.

You might also like