Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

write for loop that display the following set of numbers 10,20,30,40,50 1000

0 votes
asked May 2, 2018 by anonymous 1 flag
write for loop that display the following set of numbers 10,20,30,40,50 1000

6 Answers

0 votes
answered May 2, 2018 by happyloman (140 points)
for (int i = 10; i < 1001; i+=10)

{

  std::cout << i << std::endl;

}
+1 vote
answered May 7, 2018 by Ryan (1,230 points)
#include <iostream>

using namespace std;

int main()
{
    const int NUM_MAX = 1000;
    for (int i = 0; i < (NUM_MAX + 1); i = (i +10))
    {    
        if (i == 50)
        {
            i = 1000;
        }
        
        cout << i;
    }
    
    return 0;
}
0 votes
answered May 7, 2018 by ayan (290 points)
okokokokokokokokokookokokokokkokok
0 votes
answered May 7, 2018 by ayan (290 points)
go ask your teacher bro
0 votes
answered Jun 5, 2018 by Nikhil Kakkireni (320 points)
#include<stdio.h>

void main()

{

int i;

for(i=10;i<=1000;i+=10)

{

printf("%d   ",i)

}

}
0 votes
answered Jun 6, 2018 by Raja D (180 points)
for(int i=1;i<=1000;i++)

{

    int y=i*10;

    printf("%d",y);

}
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...