Programming Exercise on Chapter 1 - Examples, Solutions | Assignment



Programming Exercises

C Examples, Solutions | Assignment


1. Write a program to display the equation of a line in the form "ap + bq = c", for a = 10, b = 5 and c = 20

Get Solution >>



2. Write a program that will print your mailing address in the following form

  • First Line: Name
  • Second Line: Door No, Street
  • Third Line: City, Pin Code








3. Write a program to output the following multiplication table:

  • 5 * 1 = 5
  • 5 * 2 = 10
  • 5 * 3 = 15





4. Given the values of three variables a, b and c, write a program to compute and display the value of x, where x = a / b-c
  • Execute your program for the following values:
             (a) a = 250, b = 85, c = 25
         (b) a = 300, b = 70, c = 70  

Get Solution >>



5. Given two integers 20 and 10, write a program that uses a function add() to add these two numbers and sub() to find the difference of these two numbers and then display the sum and difference in the following form:
        20 + 10 = 30
        20 - 10  = 10

Get Solution >>



Post a Comment

1 Comments

  1. Nice and genuine information.

    This is my website related to technology tips in english, please visit it.

    https://www.technologytips.info/

    ReplyDelete

Ask Me Everything About Programming.