(X) C Programming Lab Sheet 1 and 2

 

C Programming Lab Sheet-1

  1. Write a C program to display "Hello World".

  2. Write a C program to find the sum of two numbers.

  3. Write a C program to calculate simple interest.

  4. Write a C program to find the area and perimeter of a rectangle by asking length and breadth from the user.

  5. Write a C program to find the area and circumference of a circle.

  6. Write a C program to find the remainder of two numbers.

  7. Write a C program to convert centigrade to Fahrenheit where f=1.8c+32.

  8. Write a C program to calculate cube of a given number.

  9. Write a C program to get time in seconds and convert it to hour, minute and second.

  10. Write a C program to get days and convert it to years, months and days.

  11. Write a C program to check whether the given number is divisible by 7 or not.

  12. Write a C program to check whether the given number is even or odd.

  13. Write a C program to input marks of computer science and check whether the student is pass or fail where the pass mark is 40.

  14. Write a C program to ask two numbers and display the smaller one.

  15. Write a C program to ask three numbers and display the greatest among them.

  16. Write a C program to find the greatest number among four numbers.

  17. Write a C program to input a number and check whether the number is positive, negative or zero.

  18. Write a C program to find the middle number among three different numbers.

  19. Write a C program that inputs cost price and selling price and determine whether there is profit or loss.

  20. Write C program to find the commission amount in the basis of sales amount as per the following conditions:
    Sales Amount            Commission
    0-1000                              5%
    1001-2000                       10%
    >2000                              12%

End of C Programming Lab Sheet-1


C Programming Lab Sheet-2

  1. C Programming Lab Sheet -2C program to display 5,10,15,.....50

  2. C program to display 5,10,15,..... up to 50th terms

  3. C program to display 1,2,4,8,16,..... up to 10th terms

  4. C program to display 1,2,4,7,11,..... up to 10th terms

  5. C program to display 2,8,18,32,..... up to 10th terms

  6. C program to display 999,728,511,..... up to 10th terms

  7. C program to display 100,98,94,88,80,..... up to 10th terms

  8. C program to display 7,22,11,34,17,..... up to 10th terms(Hailstone Series)

  9. C program to display 0,1,1,2,3,5,8,13,..... up to 50th terms (Fibonacci Series)

  10. C program to display the series with their sum 1,2,3,4,..... up to 10th terms

  11. C program to display all even numbers from 2 to 20 and find their sum.

  12. C program to find the factorial of the given number.

  13. C program to check whether the supplied number is prime or composite.

  14. C program to display all prime numbers from 1 to 100.

  15. C program to check whether the given number is Armstrong or not.

  16. C program to display factors of a supplied number.

  17. C program that asks a multi-digit number and calculates the sum of its individual digits.

  18. C program to display the reverse of a supplied number.

  19. C program to test whether the supplied number is Palindrome number or not.

  20. C program to display:
    1
    22
    333
    4444
    55555

End of C Programming Lab Sheet -2