menu
Qamnty
Login
Register
My account
Edit my Profile
Private messages
My favorites
Write a for loop that displays the following set of numbers: 0,10,20,30,40,50....1000
Ask a Question
Questions
Unanswered
Tags
Ask a Question
Write a for loop that displays the following set of numbers: 0,10,20,30,40,50....1000
asked
Jul 23, 2019
183k
views
2
votes
Write a for loop that displays the following set of numbers: 0,10,20,30,40,50....1000
Computers & Tech
college
Diego Tejada
asked
by
Diego Tejada
8.6k
points
answer
comment
share this
share
0 Comments
Please
log in
or
register
to add a comment.
Please
log in
or
register
to answer this question.
1
Answer
1
vote
C# program code:
int i = 0
while (i<=1000)
{
console.Writeline("{0}",i);
i = i + 10;
}
Step-by-step explanation:
First we set variable to initial value. In this example it is 0. Then we enter into while loop. This type of loop executes the code until the condition is fulfilled. In our case while loop checks if i <=1000. It is and then it writes it on the screen. Next step is to increase it by 10. Then it does the same code again.
Last number that will be printed is 1000. After that it will increase i to 1010 and it will exit the loop.
VikramV
answered
Jul 28, 2019
by
VikramV
9.5k
points
ask related question
comment
share this
0 Comments
Please
log in
or
register
to add a comment.
← Prev Question
Next Question →
No related questions found
Ask a Question
Welcome to Qamnty — a place to ask, share, and grow together. Join our community and get real answers from real people.
Categories
All categories
Mathematics
(3.7m)
History
(955k)
English
(903k)
Biology
(716k)
Chemistry
(440k)
Physics
(405k)
Social Studies
(564k)
Advanced Placement
(27.5k)
SAT
(19.1k)
Geography
(146k)
Health
(283k)
Arts
(107k)
Business
(468k)
Computers & Tech
(195k)
French
(33.9k)
German
(4.9k)
Spanish
(174k)
Medicine
(125k)
Law
(53.4k)
Engineering
(74.2k)
Other Questions
The book shows how to add and subtract binary and decimal numbers. However, other numbering systems are also very popular when dealing with computers. The octal (base 8) numbering system is one of these.
describe an advance in technology that makes life more enjoyable. what discoveries contribute to this technology?
Disadvantages of using animation in advertising? advantages and disadvantages of using animation for education? advantages and disadvantages of using animation in entertainment?
Twitter
WhatsApp
Facebook
Reddit
LinkedIn
Email
Link Copied!
Copy
Search Qamnty