Skip to main content

1.         WAP to in put an age of a person and check where he is an adult or not    
2.         WAP to check whether a number is odd or even 
3.         WAP to check weather a number is divisible by 8 or not  
4          WAP to check whether numerator and denominator and check it is divisible or not.  
5.         WAP to check whether a number is positive or not. 
6.         WAP to check a Year leap year or not.  
7.         WAP to check a character is vowel or not.  
8.         WAP to calculate the commission at the end of the month for a company, which gives a 10% commission to its salesman if their monthly sales amount is Rs 10,000 or more. 
9.         ABC Company gives a 5% commission to its salesman if their monthly sales are less than Rs. 10,000 and a10% commission if is equal to or greater than Rs. 1 0,000 Calculate the commission at the end of the month.
10.       XYZ Company gives allowances to its employees depending on their grade as follows.

Grade
Allowances
A                   
300
B                    
250
Others            
100        

Calculate the Salary at the end of the month

11.       The company plans to give a year –end 5% bonus to each of its employees, However if an employee has beenworking for 10 or more years at the company he has to get an additional Rs. 500, lets calculate the bonus for any given employee 
12.       Montauk Company has decided to make their commission structure more aggressive for their sales department as follows.

Sales
Grade
Commission
10,000
1
10%

2
8%
<=10,000
--
5%

13.       WAP to calculate the fare for a railway journey depending on the following conditions.

Age
Distance [ in Kms ]
Fare
Below 10
Below 50
5

51 -100
10

Above 100
15
11-50
Below 50
10

51-100
15

Above 100
20
Above50
Below 50
15

51-100
20

Above100
25

14.       WAP to initialize the Name of Student and his Average Marks and the assign him a grade as per the following rules
a.         AvgMarks  >=90 then grade is A+
b.         AvgMarks >=80 and <90 then grade is A
c.         AvgMarks >=70 and <80 thengrade is B+ 
d.         AvgMarks >=and <70 then grade is B
            e.         Avg Marks >=50 and <60 then grade is C
            f.          AvgMarks <50 then FALL

15.       WAP to find the roots of a quadratic equation given by ax2 + bx + c =0 If              b2- 4ac > 0 then print the roots are real and unequal
Rootl = **********    Root2 =        *************
2a        2a        v If b - 4ac = 0 then print the, roots are real and equal.
Root= — la
If b2- 4ac < 0 then print the roots are complex and imaginary.

16.       The rates of income tax applicable on income of the individuals for the assessment year 2003-2004 were as follows.

Net income Range
Rates of Income Tax
Up to Rs 50000
Nil
Above Rs. 50000 but up to Rs. 60000.
10% of the amount by which the                                                                                                                                                                                              total income  exceeds Rs. 50000
Above Rs. 60000 but up to Rs 150000.
Rs. 1000 plus 20% of the amount by which the total income exceeds Rs. 6 thousand
Above Rs. 150000
Rs. 19000 plus 30% of the amount by which the total income exceeds Rs. 150000.
17.       In Order to force consumers to consume less water at their homes ,the corporation adopts a set of conservative annual water tax rules based upon the water consumption of the consumer The criteria and tax are as follows

Water Consumed   [in gallons]
Tax Rate
Up to 50
NIL
More than 50 but less than100
500
More than 100 but less than 200
800
More than 200 but less than 300
1100
More than 300
1700

18.       A bicycle shop hires a bicycle on a daily basis at different rates throughout the year the following table illustrates how the hire charges vary through the year.

Season
Daily Charges [in Rs.]
Spring
4.00
Summer
7.00
Autumn
3.00
Winter
2.00

The proprietor also gives a discount on the number of days the bicycle is hired for. If the bicycle are hired for more than 10days .than a discount of 30% is given on the total charge  Further for every bicycle hired a security deposit of Rs.100 must be paid WAP to initialize the season and the number of days the bicycle is hired for and output the hire charge including the deposit .
19.       A student appears for a test in 3 subjects. Each test is out of 100 marks. The percentage of each student has to be calculated and depending on the percentage calculated, grades are given as under.

Percentage
Grade
>=90
A+
80-89
A
70-79
B+
60-69
B
50-59
C+
<50
Fail
                                  



20.       Universal, a stationary store gives discounts to its customers.  The store gives two types of discounts namely quantity and cash discounts. The quantity discount is given depending on the quantity bought as shown in the table given below. A cash discount of 5% is given only to customers who make an early payment, which is within three days of the delivery of the order.

Qty
Discount
<5
0%
>=5 but <25
5%
>=25 but <50
10%
>=50 but <100
15%
>100
20%

WAP to calculate the bill amount.
21.       A company insures its drivers in the following cases:
            a.         If the drivers is married
            b.         If the drivers is unmarried, male and above 30 years of age.
            c.         If the drivers is unmarried, female and above 25 years of age.
            In all other cases the driver is not insured. If the marital status, sex and age of the driver are inputs, write a program to determine whether the driver is to be insured or not.
22.       Any character is entered through the key board, write a program to determine weather the character entered is a capital letter, a small case letter,, a digit or a special character.
           
Character
ASCII values
A-Z
65-90
a-z
97-122
0-9
48-57
Special symbols
0-47,58-64,91-96,123,127

23.       An insurance company follows following rules to calculate premium.
a. If a person’s health is excellent and the person is between 25 and 35 years of age and lives in a city and is a male then the premium is Rs. 4 per thousand and his policy amount can not exceed Rs. 2 Lakhs.
b. If a person’s satisfied all the above conditions except that the sex is female then the premium is Rs. 3 per thousand and her policy amount can not exceed Rs. 1 Lakhs.
c. If a person’s health is poor and the person is between 25 and 35 years of age and lives in a village and is a male then the premium is Rs. 6 per thousand and his policy amount can not exceed Rs. 10,000.
            d. In all the other cases the person is not insured.
WAP to output whether the person should be insured or not, his/her premium rate and maximum amount for he/she can be insured.
24.       A library charges a fine for books returned late. Following are the fines:

First five days
:
40 paise per day
Six to ten days
:
65 paise per day
Above-ten days
:
80 paise per day

WAP to calculate the fine assuming that the book is returned N days late.

25.       WAP to input two numbers and print the greatest number among the two
26.       WAP to find the greatest no among the three numbers inputted from the user
27.       WAP to calculate the amount for telephone bill as per the given instructions:
For first 100 calls = Rs. 100/
For additional 50 calls = Rs. 2 per call
For calls more than 150 = Rs. 2.50 per call
28.       A security man is paid at the hourly rate (R) for the first 35 hours of work in a week. There after, he is paid at 1.5 times the hourly rate (R) for the next 20 hours and at 2 times the hourly rate (R) for further hours of work in the week.
Taking the number of hours (H) and the rate per hour (R) as inputs, WAP to calculate the weekly wage (W).
29.       A bank offers the following rates of interest for the fixed deposits:
           
Time (in Year)
Rate (%)
Up to ½
9
>½ but <=1
10
>1 but <=3
11
>3
12

The amount (A) after n year is calculated by using the formula:
A=P(1+r/100)n
Where, = Principal amount
r = rate of interest
WAP to calculate the amount accrued by the investor.

30.       The monthly electricity bill is to be computed as follows:
            Minimum Rs. 250 for the first 100 units
            Plus Rs. 0.40 per unit for next 50 units
            Plus Rs. 0.50 per unit for next 50 units
            Plus Rs. 0.60 per unit for next 50 units
            WAP which calculates the monthly bill based on the number of units consurned.
31.       The Solution of two linear equations
            ax + by = c, px + qy = r
            is given as x = cq – br / aq - bp , y = - cp / aq – bp
WAP to find the solution of any pair of simultaneous equations (linear) for the given values of a, b, c and q, r, p if aq – bp = 0 then print no finite solution.
32.       WAP to find out the charge for sending parcels when the charges are as follows:
For the first 1 KG. or fraction there of Rs. 20.00
For every additional 1 KG. or every fraction there of Rs. 25.00
33.       A sales man is paid commission on the following basis:

Sales
Commission Rate
Upto Rs. 10000
2%
Rs. 10001 to Rs. 20000
3%
Rs. 20001 to Rs. 50000
5%
Rs. 50001 to Rs. 70000
8%
Above Rs. 70000
10%

WAP to accept the sales amount and calculate the commission, print sale commission rate and commission.
34.       WAP to comput the result of the following condition based expression :
F(x) = 4x + y if x>0
F(x) = 4x - y if x<0
35.       A cloth showroom has announced the following festival discounts on purchase of
itoms:

Amount of purchase
Discount in %

Mill Cloth
Handloom items
Less than Rs. 1000
2%
5%
Rs 1000 to Rs. 5000
20%
25%
Rs. 5001 to Rs.10000
40%
50%
Above 10000
50%
60%

WAP to compute the net amount paid by the customer. Assume all required values to be inputted by the user. Make use of if and switch structures.
36.       WAP to accept a day number and print the corresponding day name using switch.
37.       WAP to accept a month number and print the corresponding month name using switch.
38.       WAP to create a menu based program to do the following using switch:
            1.         Find the volume of a cone                          ********
2.         Find the volume of a cylinder                    ********
3.         Find the volume of a sphere                       ********
39.       Write a menu based program using switch to calculate the following:
a.         Area of Circle [***********] where r is the radius of the circle.
b.         Circumference of circle [***********]
c.         Area of Semi circle [***********]
            d.         Perimeter of semi circle [***********]
40.       Create a menu-based program to find the addition, division, multiplication, and
Subtraction of two numbers depending upon the user's choice.
41.       Using a menu driven program to calculate the area of three squares whose sides are x,y and x+3y respectively where x=2km, y= 5.5 km.
42.       WAP to create a menu based program to find the following depending on the user choice using switch
a.         Absolute value of a number
b.         Square root of a number
c.         Random number between 0 to 1
d.         Natural logarithm of a number.
43.       WAP to create a menu driven program to do the following:
a.         Area of Rectangle
b.         Diagonal of Rectangle
c.         Perimeter of Rectangle
44.       WAP to input a number and print it in words. [ 1- One, 2- Two……................] (Using switch)
45.       WAP to create menu based program to find volume of cube, volume of cuboids and volume of sphere.
46.       WAP to input the aggregate percentage and assign the respective stream as per the following conditions:

Aggregate %
Stream
>90
Science with computers
80-89
Science with Hindi
70-79
Commerce with computers
60-69
Commerce with Hindi
           
47.       Using a switch statement, write a menu driven program to convert a given temperature from Fahrenheit to Celsius and vice versa. For an incorrect choice, an appropriate error message should be displayed.
C=5/9 * (F-32) and F=1.8* (C+32)
48.       WAP to create a class salary to input the name, address, phone, subject, monthly salary, income tax and compute the annual income tax as 5% of the annual salary above Rs. 1,75,000/=. Display all the details after calculations.
49.       A cloth showroom has announced the following festival discounts on the purchase of items, based on the total cost of the items purchased: -

Total Cost
Discount (in %)
Less than Rs. 2000
5%
Rs 2001 to Rs. 5000
25%
Rs. 5001 to Rs 10000
35%
Above 10000
50%
Write a program to input the total cost and to compute and display 4he amount to be paid by the customer after availing the discount
50.       Normally a year is said to be a leap year if it is divisible by 4. But if the year is century year then it is not a leap year unless divisible by 400. For example year 1996 was a leap year. Century year 2000 was also a leap year but century year 2100 will not be a leap year as it is not divisible by 400. WAP program to accept a year and print the message whether the year entered is a leap year or not.
51.       WAP to input the code of a particular item, the quantity purchased and the rate calculate the total purchase amount and print it along with the gift to be presented. The gift to the customer is given on the following basis:

Amount of purchase (Rs)
Gift
100 and above but less than 500
A key chain
500 and above but less than 1000
A leather purse
1000 and above
A pocket calculator

At the end of the bill Thank You' must be printed.








C ASSIGNMENT SERIES- 3
Looping
 1.        WAP to find the factor of a No.
2.         WAP to find the sum of factors of a No.
3.         WAP to find the print of even factors.
4.         WAP to print the odd factors of a no.
5.         WAP to find the sum of even factors of a no.
6.         WAP to find the sum of odd factors of a no.
7.         WAP to input a no and check whether its is perfect on not.
(Sum of factors of a no excluding the no. is equal to the no.
8.         WAP to input a no and check whether it is prime or not.
(No which has two factors one and no itself)
9.         WAP to print the factors, which are prune.
10.       WAP to count the no of even factors of a no.
11.       WAP to count the no of odd factors of a no.
12.       WAP to count the no of prime factors of a no.
13.       WAP to find the HCF and LCM of two no.
14.       WAP to find the factorial of a no.
15.       WAP to input x and y and find the value of x.
16.       WAP to input the no and find the length of the no. (Count the digits)
17.       WAP to input a no and print the no in reverse order.
18.       WAP to input a no and check whether it is palindrome no or not.
19.       WAP to find the sum of digits of a no.
20.       WAP to find the sum of first and last digit of a no.
21.       WAP to print the prime digits of a no.
22.       WAP to find the square of each digit of no.
23.       WAP to find the cube of each digits of a no.
24.       WAP to print the factorial of each digit of a No.
25.       WAP to find the sum of even digits of a no.
26.       WAP to find the sum of odd digits of a no.
27.       WAP to find the sum of prime digits of a no.
28.       WAP to count how many even digits arc there in a no.
29.       WAP to count how many odd digits are there in a no.
30.       WAP to count how many prime digits are there in a no.
31.       WAP to find the sum of square of each digit of a no.
32.       WAP to find the sum of cube of each digit of a no.
33.       WAP to find the sum of factorial of each digit of a no.
34.       WAP to find the sum of square of odd digits of a no.
35.       WAP to find the sum of cube of even digits of a no.
36.       WAP to find die sum of cube of odd digits of a no.
37.       WAP to count the no of factors of a no.
38.       WAP to print the factors of each digit of a no.
39.       WAP to input a no and find the smallest digit of a no (without Array)
40.       WAP to input a no and find the largest digit of a no (without Array)
41.       WAP to input a no and arrange the digits in ascending order.
42.       WAP to input a no and arrange the digits in descending order.
43.       WAP to input a No and find the smallest no formed from the No.
44.       WAP to input a No and find the largest no formed from the No.
45.       WAP to input a no and check whether it is Armstrong No not.
46.       WAP lo input a no and check whether it is special on not.
47.       WAP to input n no check whether it is automophic on not.
48.       WAP to input a no and check weather it is Magic no on not.
49.       WAP to input on and check weather it is a sunny no or not.
(Square root (N) + 1) equal an integer.
50.       WAP to input a No and find the frequency of each digit of a No.
51.       WAP to print all the prime nos. between 1 lo 100.
52.       WAP to print all the prefect nos. between 1 to 100.
53.       WAP to print all the special Nos. between 10 to 500000
54.       WAP to print all the special No between 1 to n
55.       WAP to print all the Armstrong Nos. between 1 to 500
56.       Print the sum of magic nos. between I to n
57.       Print the sum of Armstrong nos. between 1 to 200000.
58.       Print the Pythagorean triplets between 1 to 100.
(sum of square of two successive nos. is equal to the third one) 33+ 44=52
59.       WAP to input a no and print its prime factorizations.
60.       Print all the Prime palindrome nos. between I to 500.
61.       WAP to print the following series.
1,2,3,4…………………………………up-to 10.
62.       11,12,13,14…………………………………up-to 50.
63.       I, 3, 5. 7…………………………………up-to 20.
64.       1,3, 5,7…………………………………up-to 20 terms.
65.       2,4,6,8…………………………………up-to 15.
66.       2,4, 6, 8…………………………………up-to 20 terms.
67.       11,13,15…………………………………up-to 50 terms.
68.       42, 44,46…………………………………up-to 100 terms.
69.       10,9,8,7…………………………………up-to 1.
70.       100. 99, 98…………………………………up-to 50.
71.       1,4,9,16…………………………………up-to 20 terms.
72.       1,8,27,64…………………………………up-to 20 terms.
73.       0,3,8,15…………………………………up-to 25 terms.
74.       2,5,10,17…………………………………up-to 25 terms.
75.       1,2,4,8,16…………………………………up-to 30 terms.
76.       1,5,25,1257…………………………………up-to 20 terms.
77.       3,6,9,12…………………………………up-to 20 terms.
78.       4,8,12,16…………………………………up-to 20 terms.
79.       12,24,36…………………………………up-to 40 terms.
80.       100,5000,2500…………………………………up-to 250.
81.       2,4,8,16…………………………………up-to 20 terms.
82.       100,97,94,91…………………………………up-to 10 terms.
83.       Find the sum of following 1+2+3+4…………………………………up-to 20 terms.
84.       11+12 +13 + 14…………………………………up-to 50 terms.
85.       1+3+5+7…………………………………up-to 50 terms.
86.       2+4+6+8……………………………………up-to 99 terms.
87.       1+7+13+19……………………………………..up-to 25 terms.
88.       1+4+9+16……………………………………..up-to 25 terms.
89.       1+8+27+64……………………………………..up-to 25 terms.
90.       0+3+8+15……………………………………..up-to 20 terms.
91.       2+5+10+17……………………………………..up-to 25 terms.
********92, 93,95,96,97,98,99, 102, 105**********
Balance
92.
93.
94.       1!+2!+3!+4! ……………………….n!
95.
96.
97.
98.
99.
100.    1*2*3*4……………………….n terms
101.    1*3*5*7……………………….n terms
102.
103.    1-2+3-4+5……………………….n terms
104.    1-3+5-7+9……………………….n
105.
106.    1,11,121,1331,14641……………………….n
107.    1,10,100,1000……………………….n
108.    1+22+33+44……………………….n
109.    1,11,111……………………….n
110.    2-4+6-8+10……………………….N
111.    1+(1+2)+(1+2+3)+(1+2+3+4)+……………….(1+2+3……..20)
112.   
113.    1,4,5,9,14,23,37,60……………………….n
114.    0,1,1,2,3,5,8,13……………………….n
115.    14,24,34,44……………………….n
116.    1231491, 1681, 1256, 6561, 165536, 43046721 sum of all above terms in the series is 4339194.
117.    WAP to print the cube of all non prime numbers till x.
118.    Print all the non perfect nos. till x
119.    Count how may zero's are there in a no entered by the user.
120.    Accept x numbers from the user and count how many are negative, positive and zeroes.
121.    Accept 10 nos. from the user and find the smallest and the largest no entered by the user.
122.    Accept a no from the user and print it in words.
123.    Accept 50 nos. from the user and count how may belong to which group.

0-10
10-20
20-30
30-40
40-50
50-60
60-70
70-80
80-90
90-100 above

124.    Check the nature of the no entered by the user (Single digit double light…….)
125.    Print the table of a no till 20
126.    Print the twin prime nos. till the limit (entered by the user)
127.    Print the integers that has the largest no factors between 1 to 10000.
128.    Print the average of the factors of a given no.
129.    Print the average of all even nos. and factorial of odd numbers out of 50 numbers entered by the uses.
130.    WAP print the following pattern

130.
*                  
*          *
*          *          *
*          *          *          *
*          *          *          *        *
131.
*          *          *          *        *
*          *          *          *
*          *          *
*          *
*
132.
*
*          *
*          *          *
*          *          *          *
*          *          *          *          *
133.
*          *          *          *        *
*          *          *        *
*          *        *
*        *
                                           *
134.
                *
            *  *  *
        *  *  *  *  *
    *  *  *  *  *  *  *
*  *  *  *  *  *  *  *  *
135.
                *
            *  *  *
        *  *  *  *  *
    *  *  *  *  *  *  *
        *  *  *  *  *
            *  *  *
                *

136.
                *
            *      *
        *     *      *
    *     *     *       *
        *     *      *
            *     *
               *
137.

*
                 *         *
*          *          *
      *          *         *        *
*          *            *        *        *

138.
*  *  *  *  *  *  *  *
*  *  *          *  *  *
*  *                  *  *
*                          *
139.
*  *  *  *  *  *  *
*  *  *      *  *  *
*  *              *  *
*                      *
*  *              *  *
*  *  *      *  *  *
*  *  *  *  *  *  *
140.
a  a  a  a  a  a  a  a
a  a  a          a  a  a
a  a                  a  a
a                          a
141.
1                  
1          2
1          2          3
1          2          3          4
1          2          3          4        5


142.
1                  
2          2
3          3          3
4          4          4          4
5          5          5          5          5
143.
1                  
2          3
4          5          6
7          8          9          10
144.
1          2          3          4        5
1          2          3          4
1          2          3
1          2
1
145.
1          2          3          4          5
2          3          4          5
3          4          5
4          5
5
146.
5          4          3          2          1
4          3          2          1
3          1          1
2          1
1
147.
1
2          1
3          2          1
4          3          2          1
5          4          3          2          1
148.
1   2   3   4   5   5   4   3   2   1
1   2   3   4             4   3   2   1
1   2   3                       3   2   1
1   2                                 2   1
1                                           1
149.
5          4          3          2          1
4          3          2          1
3          2          1
2          1
1
150.
1                  
1          2
1          2          1
1          3          3          1
1          4          6          4          1
151.
5          4          3          2          1
5          4          3          2
5          4          3
5          4
5
152.
15        14        13        12        11
10        9          8          7
6          5          4         
3          2
1
153.
1   2   3   4   5   5   4   3   2   1
1   2   3   4             4   3   2   1
1   2   3                       3   2   1
1   2                                 2   1
1                                           1
1   2                                 2   1
1   2   3                       3   2   1
1   2   3   4             4   3   2   1
1   2   3   4   5   5   4   3   2   1
154.
                    1
               1   2   1
          1   2   3   2   1
     1   2   3   4   3   2   1
1   2   2   4   5   4   3   2   1
155.
                    0
               1   0   1
          1   2   0   2   1
     1   2   3   0   3   2   1
1   2   2   4   0   4   3   2   1
156.
9          8          7          6
5          4          3
2          1
                                 0

157.    Prepare an interactive program to input the basic salary of 15 persons. Each one of them gets 25%of the basic as house rent allowance (HRA). 15% of basic as Conveyance allowance and 10% as entertainment allowance the total salary calculated by adding basic + HRA + conveyance and entertainment allowance Calculate how many out of  15 Got salary above Rs. 3000/= and also print the total salary of each person.
158.    The present population of a country is P and it increases by 5% every year. The population (P) after n years is given by a formula P=P* (1.05)n. WAP lo find the population every year, for the next 10 years.
l59.     Pooja cottage industries have 75 employees. WAP to input each employee's name, grade and basic pay. Wages are then calculated according to the grade. All percentages are on Basic Pay
Grade A: employee receives HRA is 30%, Medical is 20% and deducts Income tax 25% of basic.
Grad B: employee receives HRA is 25%, Medical is 15% and deducts Income tax 20%) of basic.
Grade C: employee receives HRA is 20%. Medical is 15% and deducts Income tax 10% of basic.
Total Salary is calculated as Basic + HRA i Medical    Income Tax
160.    WAP to calculate the fare for the passengers traveling on a computerized bus. As a passenger centers the bus the computer displays “what distance will you travel?” on entering the distance the fare is printed put according to the following table:
Distance
Fare
Upto I5KM
Rs. 5
Upto25KM
Rs. 10
Upto 25 KM
Rs. 15

The Computer keeps on adding and displaying the total fare after each passenger has entered. The program ends when the distance is entered as “( )” it than prints the total number of passenger who entered the bus and the total fare collected.
161.    CISC Ltd revises its rate of interest for the public deposits as follows
Year
Cumulative Interest Scheme
Annual Income Scheme

Compounded Annually
Compounded Annually
1
----
11%
2
----
11.5%
3
12.5%
12%
4
12.5%
12%
5
12.5%
12%

Deposit under the emulative scheme is accepted for a period between 3 to 5 years only.
WAP to find the
a)         Amount (A) due for sum (P) invested under the cumulative option scheme, by using the formula A  P x [1+r/100]2
b)        Interest (I) for each year under the annual Interest scheme, using the formula I=.01 x P x r 
162.    The Production P crude oil of a country in millions of barrels may be estimated by the following set of equations, where t represents the time in years.
P= 5 + 3t, 0<=t<-3  
p= 14 +( t-5/2)2 for t>3      
Write a program to find the quantity of production for every year from t = I to 10.
163.    The acceleration due to gravity as a function of altitude is given by:
g=32.17 (4390/(43 90+h))2 if  h>0
g=32. 17(1 + (h/4390)) if h<=0
Where h is the height above the sea level in miles and g is the acceleration due to gravity in ft. per sec2. WAP to print out the values of g where h range from -4 to 10.
164.    A computerized ticket counter for bumping cars at Appu Ghar Charges for each ride at the following rate:
Age
Amount per head
15 or above
Rs. 8
4 or above but below 15
Rs. 5
Accompanying kids below 4
Rs. 2
WAP, which takes as input the number of people of various age groups and prints its ticket. At the end of the day the program states the number people of different age groups who took the ride and the total amount receives as collection of fares.
165.    WAP to print the month name of the corresponding month number entered by the user, To stop the program 0 should be entered for the month number. 

Comments

Popular posts from this blog

PROGRAM TO PRINT COLOURS OF RAINBOW ACCORDING TO THE NO. INPUTTED BY THE USER

#include,stdio.h> #include<conio.h> void main() { int ch; printf("INPUT A NUMBER\n"); scanf("%d",&ch); switch(ch) { case 6: printf("Red"); break; case 5 : printf(" Orange"); break; case 4 : printf(" Yellow"); break; case 3 : printf(" Green"); break; case 2 : printf(" Blue"); break; case 1 : printf(" Indigo"); break; case 0 : printf(" Violet"); break; default : ("wrong input "); } } SIMPLE PROGRAMS FIND TYPE OF THE TRIANGLE TEMPERATURE CONVERSION COMMISSION OF A SALESMAN PRINT NUMBERS IN DESCENDING ORDER BIGGEST NUMBER AMONG THREE NUMBERS CALCULATE DIVISION A YEAR IS LEAP OR NOT A NUMBER IS ODD OR EVEN PRINT THE SQUARE ROOT ELSE PRINT N TO THE POWER 5 PRINT A NEW NUMBER BY ADDING 1 TO EACH DIGIT OF THE NUMBER PRINT THE NO. OF CURRENCY NOTES ACCORDING TO THE AMOUNT ENTERED DATA STRUCTURES ENTER DETAILS OF A STUDENT ENTER DETAILS OF A ST...

String operations in c sharp # using Microsoft visual studio 2010

using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication3 {     class Program     {         static void Main(string[] args)         {             string s,find;             int l,i=0;             s = Console.ReadLine();             string.Concat(s);             l=s.Length;             Console.WriteLine(s);             Console.WriteLine("length\t"+l );                         Console.WriteLine("first and last character  " + s[0]+"  "+s[l-1] );             for (i = 0; i < l; i++)             {      ...

Java program to take 10 cities name in an array and display which starts with consonant

import java.io.*; import java.lang.*; public class Main {   public static void main (String[]args)   {     for (int i = 0; i < args.length; i++)       {             switch (args[i].charAt (0))               {               case 'a':               case 'e':               case 'i':               case 'o':               case 'u':               case 'A':               case 'E':               case 'I':               case 'O':               case 'U':                break; ...