You are on page 1of 1

LAB 4 – GRADED TASKS

TASK – 1

Write a C++ program that takes user input in a variable and prints the square and cube value of the
number stored in variable (i.e. x2, x3)

TASK – 2

Write a C++ program that takes input value for an integer x.

By using the value of x calculate the value for following integers and print their value

 y=2x
 z = y2
 n = z3
 m = n + x2

You might also like