Assignments [ Assignment 1] - C Programming

 ASSIGNMENT - 1 

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

  1. Write a program to input a number and print it.
  2. Write a program to input two numbers and add them, then print the answer.
  3. Write a program to input two float values and find the sum of those values.
  4. Write a program to input a character and print that.
  5. Write a program to input a lowercased character and convert it into upper case.
  6. Write a program to input an uppercased character and convert into lowercase.
  7. Input two numbers and find addition, subtraction, multiplication, and division.
  8. Input two numbers and find the remainder which is obtained by dividing first number by second.
  9. Input a number and find the difference of its cube and square.
  10. Input the weight in kg and convert it into grams.
  11. Write a program to input time in seconds and convert into hours.
  12. Input full marks and obtained marks calculate percent marks.
  13. Input obtained marks and percent marks – calculate full marks
  14. Input Real price and profile percent and then calculate New Price.
  15. Calculate number of hours in a year of 365 days.
  16. Write a program to input two values and swap/interchange them.  [ you can use a third variable]
  17. Same question without using third variable.
  18. Input a fractional number say 34.78. Now store the value in integer part to first variable and value in fractional part in second variable.
  19. Write a program to input five numbers and find the sum and average of those values.
  20. Write a program to input a three-digit number [ say 456] and then find the sum of the digits of this number.
  21. Input the principal, time and simple interest and then calculate the rate of interest.
  22. Input distance in kilo meter and change it into meter.
  23. Input the height in feet changes it into meters and inches.
  24. Input a three digit number [ say 587] and reverse this number [ i.e.785 ]


 


Comments