You are on page 1of 3

Login

OnlineGDB Q&A
 
 Questions
 Unanswered
 Tags
 Ask a Question
write for loop that display the following set of numbers
10,20,30,40,50 1000
+ –

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

6 Answers
+ –

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

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

}
flag ask related question comment

+ –

+1vote
answered May 7, 2018 by (1,200 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;
}
flag ask related question comment

+ –

0votes
answered May 7, 2018 by (290 points)
okokokokokokokokokookokokokokkokok
flag ask related question comment

+ –

0votes
answered May 7, 2018 by (290 points)
go ask your teacher bro
flag ask related question comment

+ –

0votes
answered Jun 5, 2018 by (320 points)
#include<stdio.h>

void main()

int i;

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

printf("%d   ",i)

}
flag ask related question comment

+ –

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

    int y=i*10;

    printf("%d",y);
}
flag ask related question comment

Search
 
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.

Have fun taking surveys and get paid!A D S


V I A C A R B ON

 Send feedback

Snow Theme by Q2A Market


Powered by Question2Answer
...

You might also like