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
Maya R
NA
9
1.1k
What would be the output for this program?
Oct 20 2018 4:39 AM
and how many times would it run?I'm not allowed to run it because the assignment is to figure out by just looking at it. Please explain because I need to understand why. Thanks!
Console.WriteLine("\n--------- 8");
int sum=0;
bool found = false;
for (int i = 1; ! found; i++ )
{
Console.WriteLine("Enter Num");
x = int.Parse(Console.ReadLine());
if (x % 2 == 0 && x % 4 != 0)
sum = sum + x;
if (x < 0)
found = true;
Reply
Answers (
1
)
How to calculate internal rate of return (IRR)?
How to concatinate customize primary ID every new entry.