Write a program to find all the numbers divisible by 7 between a given range of numbers [n1, n2] entered by the user using a FOR loop only.
write C program. help
#include <stdio.h> int main() { int n1, n2, i; printf("Enter value for n1: "); scanf("%d",&n1); printf("Enter value for n2: "); scanf("%d",&n2); for(i=n1;i<=n2;i++){ if(i%7==0){ printf("%d\n",i); } } return 0; }
Get Answers For Free
Most questions answered within 1 hours.