You are on page 1of 10

LAB ASSIGNMENTS: 4, 5

1. Write a program that will print your name, registration


number, email address and city.

2. Write a program to print the even numbers from 10 25.

3. Write a program to print the table of 3 from 4 to 6.

4. Write a program to print the capital alphabets from G L.

5. Write a program to print the lower case vowels.

6. Write a program to print the following outputs.

1. Write a program to print the table of 5 from 1 to 5 by


using multiplication operator. Do not write the statement
in double quotes to print the answer.

2. Write a program to calculate and print the remainder of 22


after dividing by the numbers from 2 - 6. Then write the
answer here.

3. Write a program to print the table of 6 in reverse order


from 1 10 using multiplication operator.

4. Write the C++ statements in a single program to do the


following.
i. Add 4 and 7.
ii. Multiply 2 and 4, then subtract 6 from them.
iii. Multiply 6 by 4 times of 2.
iv. Subtract 7 from three times of 4.
v. Divide 8 by 9

5. Write the C++ statements in a single program to do the


following.
i. Calculate the quotient of 7 / 3
ii. Calculate the remainder of 8 / 9
iii. Calculate the remainder of 12 / 7
iv. Subtract 12 from 6 and add to 1
v. Calculate the quotient of 5 / 6 and add that to 2

6. Write the C++ statements to check whether the given


statements are true or false.
i. 11 is greater than 23
ii. 5 is less than -5
iii. 7 is not equal to 0
iv. 8 is equal to 10
v. Sum of 2 and 5 is less than or equal to 9
vi. Product of 3 and 6 is equal to 16

7. Write the C++ statements to check whether the given


statements are true or false.
i. 25 is less than 30 and 2 is greater than 1
ii. 10 is less than 6 or 4 is greater than 2
iii. Subtraction of 9 from 7 is greater than 2 or sum of 2
and 3 is equal to 6
iv. Product of 2 and 5 is equal to 10 and 5 is greater than 4
v. -1 is less than 0 and 9 is greater than or equal to 8

You might also like