numbers those are divisible by 7 between 1 and 100

#include<iostream.h>
#include<stdio.h>
#include<conio.h>
void main()
{
int i;
clrscr();
cout<<"the numbers are:- ";
for(i=1;i<=100;i++)
if(i%7==0)
{
cout<<i;
cout<<",";
}
getch();
}
closed account (1yR4jE8b)
That's such an epic program, I never would have thought of that. Thanks for sharing...
>.<
umm...thanks?
Last edited on
I am enlightened! I never would have guessed that I could calculate numbers divisible by 7 up to 100! Tell me o' wise one, can it do it for numbers divisible by 8? or how about 13? What if I wanted to print out to 1000? Can it do that as well?
Topic archived. No new replies allowed.