TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
sami sam
NA
40
30.2k
I do not know where I went wrong, Could some one help me please
Aug 7 2012 5:22 AM
/* Write a program that will print all the even numbers from 10 to 20 inclusive,
one number per line. Place a heading, "Even Numbers" above the list,
and the sum of the numbers below */
#include <stdio.h>
int i, total;
int main () {
total = 0;
i = 0;
printf("Even Numbers: \n")
while(i <= 20){
printf("%d\n",i);
total = total + i;
i = i + 2;
printf("total is %d\n", total);
}
}
Reply
Answers (
1
)
listview to return filename and file owner
How can we use while in C Programming Language