0% found this document useful (0 votes)
15 views

BSCS Program C++

Copyright
© © All Rights Reserved
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% found this document useful (0 votes)
15 views

BSCS Program C++

Copyright
© © All Rights Reserved
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/ 4

Q.

1 Write a program that inputs two numbers performs the


arithmetic operations by using arithmetic operators and display the
result on screen.

Q.2 Carve or write a program that declares and initialization two


variables of “int” data type. Program calculates the average of these
values and displays the result on screen.

Q.3 Write a program that input radius computes the area of circle.
Q.4 illustrates a program that computes and displays the area of
square.
Q.5 carves a program that adds two floating point values and
displays the sum on the screen.
Q.6 Write a program that input radius computes the area of circle
and circumference of the circle.
Q.7 Write a program that inputs four-digit number and display it in
reverse order.
Q.8 write a program that inputs the basic salary of an employee and
calculates the following allowances on the basis of basic salary:
● 25 % travelling allowance
● 15 % medical allowance
● 45 % house rent allowance
● 34 % other allowance
It calculates the gross salary and display on the screen.
Q.9 write a program that inputs even and odd numbers. It
multiplies the even number with 5 and odd number with 3, adds
them and subtracts the result from 1000, and then displays the
difference.
Q.10 write a program that inputs two numbers and interchanges the
values of two variables.

Q.11 write a program that input two numbers. It calculate


average if user enters 1 as choice. It calculate subtraction if
user enters 2 as choice. Otherwise show that multiplication.
Q.12 write a program that input two numbers. It calculate
area of circle if user enters 1 as choice. It calculates area of
circumference if user enters 2 as choice. Otherwise invalid
choice.
Q.12 write a program that input salary. If the salary is 80000
or more, it deducts 7% of salary. If the salary is 50000 or more
but less than 80000, it deducts 11000 from the salary. If salary
is less than 50000, it deducts nothing. Show that net salary
Switch statement
Q.13. write a program that input marks if marks greater than
40 show that pass, if the user enter choice 1. Write a program
that input marks if marks greater than 40 show that pass
otherwise fail, if the user enter 2 choice. Write a program that
input two numbers a and b show that number is maximum a
or b, if the user enter another choice.using switch statement.
Q.13 . write a program that inputs a floating point number, an
operator and another floating point number. It display the
result by performing the operation on the given numbers. If
the operator is a division it should check the make sure that
the divisor is not equal to zero. If the operator is not a +,-,*,or
/ then the program should print an error message.

Q.14 write a program that input two numbers. It


calculate average if user enters 1 as choice. It calculate
subtraction if user enters 2 as choice. Otherwise show
that multiplication. Using switch statement.
Q.15 write a program that input two numbers. It
calculate area of circle if user enters 1 as choice. It
calculates area of circumference if user enters 2 as
choice. Otherwise invalid choice. Using switch
statement.

You might also like