Sunteți pe pagina 1din 4

Department of Electrical & Electronics Engineering

Assignment Question
Subject: Simulation& Programming
1. Write a program to read three values and print the following result:
Sum of the values
Average of three values
Largest of three
Smallest of three
2. An electricity board charges the following rates for the use of electricity:
For first two units: 80P per unit
For next 100 units: 90P per unit
Beyond 300 units: Rs. 1.00 per unit
All users are charged a minimum of Rs. 100 as meter charge. If the total
amount is more than
Rs. 400 then an additional surcharge of 15% of total
amount is charged. Write a program to
read the name of users and
numbers of units consumed and print out the charges with name.
3. Write a program to read a double type value X that represents angle in
radians and a character type variable t that represent the type of
trigonometric function and displays the value of
Sin(x), if s or S is assigned to T
Cos(x), if c or C is assigned to T
Tan(x), if t or T is assigned to T
Using switch statement.
4. Write a program to print all prime numbers from 1 to 300.
5. Write a program to add first seven terms of the following series using for
loop

1 2 3
+ + ..
1 ! 2! 3 !

6. Twenty five numbers are entered from the keyboard into an array. The
number to be searched is entered through the keyboard by user. Write a
program to find if the number to be searched is present in the array and if it
is present display the number of times it appears in the array.
7. Write a program to pick up the largest number from 4X4 matrix.
8. Any character is input through the keyboard write a program to determine
whether the character entered is a capital letter, small letter, a digit or a
special symbol.
Character
ASCII value
A-Z
65-90
a-z
97-122
0-9
48-57
Special symbol
0-47, 58-64, 91-96-123127

9. Write a function that will generate and print first n Fibonacci number.
10.Write a program using pointer to read in an array of integer and print its
element in reverse order.
11.Write a function to swap two numbers use concept of call by reference.
12.Write a program using a function to count no. of vowels in a given line of
text.
13.Write a program with an overloaded function volume, which computes
volume of different geometrical figures like cube, cylinder and sphere.
14.Write a program which read two complex no. stored in different object and
then print the sum of two.
15.Write a program which print object number whenever we create an object.

Department
Engineering

of

Electrical

&

Electronics

Assignment Question
Subject: Simulation& Programming

16.Write a program to read three values and print the following result:
Sum of the values
Average of three values
Largest of three
Smallest of three
17.An electricity board charges the following rates for the use of electricity:
For first two units: 80P per unit
For next 100 units: 90P per unit
Beyond 300 units: Rs. 1.00 per unit
All users are charged a minimum of Rs. 100 as meter charge. If the total
amount is more than
Rs. 400 then an additional surcharge of 15% of total
amount is charged. Write a program to
read the name of users and
numbers of units consumed and print out the charges with name.
18.Write a program to read a double type value X that represents angle in
radians and a character type variable t that represent the type of
trigonometric function and displays the value of
Sin(x), if s or S is assigned to T
Cos(x), if c or C is assigned to T
Tan(x), if t or T is assigned to T
Using switch statement.
19.Write a program to print all prime numbers from 1 to 300.
20.Write a program to add first seven terms of the following series using for
loop

1 2 3
+ + ..
1 ! 2! 3 !

21.Twenty five numbers are entered from the keyboard into an array. The
number to be searched is entered through the keyboard by user. Write a
program to find if the number to be searched is present in the array and if it
is present display the number of times it appears in the array.
22.Write a program to pick up the largest number from 4X4 matrix.
23.Any character is input through the keyboard write a program to determine
whether the character entered is a capital letter, small letter, a digit or a
special symbol.
Character
ASCII value
A-Z
65-90
a-z
97-122
0-9
48-57

Special symbol
127

0-47, 58-64, 91-96-123-

24.Write a function that will generate and print first n Fibonacci number.
25.Write a program using pointer to read in an array of integer and print its
element in reverse order.
26.Write a function to swap two numbers use concept of call by reference.
27.Write a program using a function to count no. of vowels in a given line of
text.
28.Write a program with an overloaded function volume, which computes
volume of different geometrical figures like cube, cylinder and sphere.
29.Write a program which read two complex no. stored in different object and
then print the sum of two.
30.Write a program which print object number whenever we create an object.

S-ar putea să vă placă și