KEMBAR78
Basic Program Set Using C Language | PDF | Celsius | Fahrenheit
0% found this document useful (0 votes)
19 views2 pages

Basic Program Set Using C Language

Some basic problems on c language.

Uploaded by

Brum Brem
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)
19 views2 pages

Basic Program Set Using C Language

Some basic problems on c language.

Uploaded by

Brum Brem
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/ 2

Basic program set using C language

1. Write a Java program to print the area and perimeter of a circle.


2. Write a C program to print the area and perimeter of a rectangle.
3. Write a C program to swap two variables.(using third and without third variable)
4. Write a C program to compute the distance between two points.
5. Write a C program to print the ASCII value of a given character.
6. Write a C program to convert specified days into years, weeks and days. Note: Ignore leap
year.
7. Write a C program that accepts an employee's ID, total worked hours of a month and the
amount he received per hour. Print the employee's ID and salary (with two decimal places) of
a particular month.
8. Write a C program to calculate the distance between the two points.
9. Write a C program to convert a given integer (in seconds) to hours, minutes and seconds.
10. Write a C program to convert a given integer (in days) to years, months and days, assumes
that all months have 30 days and all years have 365 days.
11. Write a C program that accepts 4 integers’ p, q, r, s from the user where q, r and s are
positive and p is even. If q is greater than r and s is greater than p and if the sum of r and s is
greater than the sum of p and q print "Correct values", otherwise print "Wrong values".
12. Write a C program to check whether a given integer is positive even, negative even, positive
odd or negative odd. Print even if the number is 0.
13. Write a C program that accepts principle, rate of interest, time and compute the simple
interest.
14. Write a C program that accepts a distance in centimeters and prints the corresponding value
in inches.
15. Write a C program that accepts principal amount, rate of interest and days for a loan and
calculate the simple interest for the loan, using the following formula. interest = principal *
rate * days / 365.
16. Write a C program to print the corresponding Fahrenheit to Celsius and Celsius to
Fahrenheit.
17. Write a C program to find whether a given year is a leap year or not.
18. Write a C program to read the age of a candidate and determine whether it is eligible for
casting his/her own vote.
19. Write a C program to accept a coordinate point in a XY coordinate system and determine in
which quadrant the coordinate point lies.
20. Write a C program to find the eligibility of admission for a professional course based on the
following criteria:
Eligibility Criteria : Marks in Maths >=65 and Marks in Phy >=55 and Marks in Chem>=50
and Total in all three subject >=190 or Total in Maths and Physics >=140
21. Write a C program to read temperature in centigrade and display a suitable message
according to temperature state below :
Temp < 0 then Freezing weather
Temp 0-10 then Very Cold weather
Temp 10-20 then Cold weather
Temp 20-30 then Normal in Temp
Temp 30-40 then Its Hot
Temp >=40 then Its Very Hot
22. Write a C program to check whether a triangle is Equilateral, Isosceles or Scalene.
23. Write a C program to check whether a character is an alphabet, digit or special character.
24. Write a C program to check whether an alphabet is a vowel or consonant.
25. Write a C program to calculate profit and loss on a transaction.
26. Write a program in C to calculate and print the Electricity bill of a given customer. The
customer id., name and unit consumed by the user should be taken from the keyboard and
display the total amount to pay to the customer. The charge are as follow :

Unit Charge/unit

upto 199 @1.20

200 and above but less than 400 @1.50

400 and above but less than 600 @1.80

600 and above @2.00

If bill exceeds Rs. 400 then a surcharge of 15% will be charged and the minimum bill should be of
Rs. 100/-

27. Write a program in C to read any digit, display in the word.


28. Write a program in C to read any Month Number in integer and display Month name in the
word.
29. Write a program in C to read any day number in integer and display day name in the word.
30. Write a C program to check whether a triangle can be formed by the given value for the
angles.

You might also like