Assignment 1

  1. Write a C program that takes as input two integer numbers x and y, and prints their sum. Solution
  2. Write a C program that takes as input two integer numbers x and y, and prints their average. Solution
  3. Write a C program that takes as input two integer numbers x and y, and prints the larger number. Solution
  4. Write a C program that takes as input three integer numbers x, y and z, and prints the larger number. Solution
  5. Write a C program that takes as input the last name and the first name of the user, and prints the name, first name followed by last name. Solution
  6. Write a C program that takes as input an integer n, and prints the sum of the numbers from 1 to n. Solution
  7. Write a C program that takes as input an integer n, and prints the factorial of n. Solution
  8. Write a C program that takes as input an integer n, and then accepts as input n integer numbers. and prints their sum. Solution