Logo 
Search:

C Programming Articles

Submit Article
Home » Articles » C Programming » Mathematics ProgramRSS Feeds

Program to print multiple of 5

Posted By: Finlay Evans     Category: C Programming     Views: 14139

WRITE A PROGRAM TO PRINT THE FOLLOWING PATTERN:
(INPUT STEPS FROM KEYBORD).

5 * 1 = 5 (i.e. Table of 5)
5 * 2 = 10
5 * 3 = 15
|
|
5 * N = 5N

Code for Program to print multiple of 5 in C Programming

#include<stdio.h>
#include<conio.h>
void main()
{
        longint sum=0,i,n;
        clrscr();
        printf("\n Please Give The Value of N:  ");
        scanf("%ld",&n);
        for(i=1;i<=n;i++)
        {
            printf("\n 5 * %ld = %ld",i,5*i);
        }
        
        getch();
}




****************************** OUTPUT *********************************



 Please Give The Value of N:  5


 5 * 1 = 5
 5 * 2 = 10
 5 * 3 = 15
 5 * 4 = 20
 5 * 5 = 25

************************************************************************
  
Share: 


Didn't find what you were looking for? Find more on Program to print multiple of 5 Or get search suggestion and latest updates.

Finlay Evans
Finlay Evans author of Program to print multiple of 5 is from London, United Kingdom.
 
View All Articles

Related Articles and Code:


 
Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

 
No Comment Found, Be the First to post comment!