Search:
Forum
General C++ Programming
numbers those are divisible by 7 between
numbers those are divisible by 7 between 1 and 100
Jan 16, 2011 at 4:06pm UTC
boombakumaar13
(2)
#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();
}
Jan 16, 2011 at 4:28pm UTC
closed account (
1yR4jE8b
)
That's such an epic program, I never would have thought of that. Thanks for sharing...
>.<
Jan 16, 2011 at 5:01pm UTC
quirkyusername
(792)
umm...thanks?
Last edited on
Jan 16, 2011 at 5:01pm UTC
Jan 16, 2011 at 5:05pm UTC
wolfgang
(381)
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.
C++
Information
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs