You are on page 1of 1

1st Assignment of Introduction to Computer Programming

Due Date: 17th March 2019 Total Marks: [4*5=20]


Note:
 Submit the source.cpp files on LMS.
 Any two assignments that are same and copied will result in No Grading
Question#1: Write a program that prompts the user to enter the following details: Name, ID and
Program and display on the screen in the following format:
“Your name is ________” (whatever name the user has entered should be displayed here)
“Your ID is ___________” (whatever ID the user has entered should be displayed here)
“You are enrolled in ________ Program” (whatever Program the user has entered such as
MCS\MIT should be displayed here)

Question#2: Write a C++ program that print the star pattern as shown below:
****
****
****
****

Question#3: Write a program that asks the user to enter two numbers, obtains the two numbers
from the user and prints the sum, product, difference, and quotient of the two numbers.

Question#4: Write a program that prints a box, an oval, an arrow and a diamond as follows:

******** *** * *
* * * * *** * *
* * * * ***** * *
* * * * * * *
******** * * * * *
*** * * *
* * *
* *

You might also like