Questions

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

Wap to enter 3 no.s and print smallest no.?

Wap to enter length and breadth to print area of rectangle?

Wap to enter radius to print area of circle?

Wap to enter height and base to print area of triangle?

Wap to enter principal, rate and terms to calculate simple interest?

Wap to enter year and check it is leap year or not?

Wap to print following series…

1 4 9 16 25 ………….100

1 8 27 64 125 ……….1000

1 3 5 7 9 ………………….100

1 4 10 19 31…………..100

1 3 7 13 21 31………..100

Wap to input a number and print its factorial?

As input – 5

Factorial – 5*4*3*2*1 = 120

Wap to input a number and print its reverse number and produce the difference between
input no.s and reverse no.?

Wap to input a number and check it is Armstrong no.s or not?

Example

Input  153

3*3*3=27

5*5*5=125

1*1*1=1

------------

153 – if both are same so it is Armstrong?


Wap to print 1 to 10 no.s and also print the sum and average of these no.s?

Wap to input a no. and print its table.?

Wap to input a two no.s and print all even no.s between them?

Input

Start – 5

End – 20

Output 6 8 10 12 14 16 18 20

Wap to input a no. and check it is prime no. or not?

Prime no.

1- A no. which is not divisible by any other no. except 1 and itself.
2- No any no. is divisible by more than its half.

Wap to input salary and calculate following as per given conditions.

1- Salary<5000
Hra=salary*10/100
Da=salary*100/100
Ta =salary*5/100
Total=salary+da+ta+hra

2- Salary >=5000 and salary <10000


Hra=salary*12/100
Da=salary*110/100
Ta=salary*8/100
Total=salary+da+ta+hra
3- Salary>=10000
Hra=salary*15/100
Da=salary*115/100
Ta=salary*10/100
Total=salary+da+ta+hra
Wap for following patterns….

12345
12345
12345
12345
12345

55555

44444

33333

22222

11111

22

333

4444

55555

You might also like