write a program to print all numbers between lower limit to upper limit which are divisible by 5.
Answers
Answered by
7
this is the program to print all the number between 0 to any limit which are divisible by any number which you can put in the program !!
(if you have to divide a number with 5 then write five in the program output)
#include<stdio.h>
#include<conio.h>
void main()
{
int i, n, d ;
clrscr() ;
printf("Enter the limit : ") ;
scanf("%d", &n) ;
printf("\nEnter the number : ") ;
scanf("%d", &d) ;
printf("\nThe numbers divisible by %d are :\n\n", d) ;
for(i = 1 ; i <= n ; i++)
if(i % d == 0)
printf("%d\t", i)
; getch() ;
}
hope this answer helps please mark this answer as brainliest and follow me !!
(if you have to divide a number with 5 then write five in the program output)
#include<stdio.h>
#include<conio.h>
void main()
{
int i, n, d ;
clrscr() ;
printf("Enter the limit : ") ;
scanf("%d", &n) ;
printf("\nEnter the number : ") ;
scanf("%d", &d) ;
printf("\nThe numbers divisible by %d are :\n\n", d) ;
for(i = 1 ; i <= n ; i++)
if(i % d == 0)
printf("%d\t", i)
; getch() ;
}
hope this answer helps please mark this answer as brainliest and follow me !!
IamInvincible:
at least give it a thanks
Answered by
0
Answer:
yes, done
Explanation:
int i, n, d ;
clrscr() ;
printf("Enter the limit : ") ;
scanf("%d", &n) ;
printf("\nEnter the number : ") ;
scanf("%d", &d) ;
printf("\nThe numbers divisible by %d are :\n\n", d) ;
for(i = 1 ; i <= n ; i++)
if(i % d == 0)
printf("%d\t", i)
; getch() ;
}
Similar questions