C Number Pattern Programs With Easy Solutions | Part - 1



C Language Number Pattern Programs with Easy Solutions


Number Pattern Programs With Solutions #allaboutprogramming62


1. Write a program using one print statement to print the pattern of asterisks as shown below

1
1 2
1 2 3 
1 2 3 4

Get Solution>>





2. Write a program using one print statement to print the pattern of asterisks as shown below

1
2 2
3 3 3
4 4 4 4

Get Solution>>






3. Write a program using one print statement to print the pattern of asterisks as shown below

1
2 3
4 5 6
7 8 9 10

Get Solution>>



4. Write a program using one print statement to print the pattern of asterisks as shown below

1
3 5
7 9 11
13 15 17 19

Get Solution>>







5. Write a program using one print statement to print the pattern of asterisks as shown below

1
2 5
9 14 20
27 35 44 54

Get Solution>>







C Star Pattern Program with Easy Solutions | Part - 1



Star Pattern Programs with Solutions



C Star Pattern Program


1. Write a program using one print statement to print the pattern of asterisks as shown below

   ****
Get Solution>>





2. Write a program using one print statement to print the pattern of asterisks as shown below

   ****
   ****
   ****
   ****

Get Solution>>






3. Write a program using one print statement to print the pattern of asterisks as shown below

   *
   **
   ***
   ****

Get Solution>>





4. Write a program using one print statement to print the pattern of asterisks as shown below


        *
      **
    ***
  ****  

Get Solution>>






5. Write a program using one print statement to print the pattern of asterisks as shown below


    ****
    ***
    **
    * 

Get Solution>>






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 >>



Comments System

blogger/disqus/facebook