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.

how can I work this code?

+9 votes
asked Nov 5 by Nora (220 points)

4 Answers

+3 votes
answered Nov 9 by Peter Minarik (63,320 points)
cout << "the number is: " << j << endl;
+1 vote
answered Nov 14 by vaibhav (290 points)
#include <iostream>

using namespace std;

int main()
{
    cout<<"we will print numbers from 1 to 20 using for loop"<<endl;

    for(int j=1;j<=20;j++)
{
        cout<<"the number is:"<<j<<endl;
}   

    return 0;
}
0 votes
answered 3 days ago by Mi Corazón (140 points)
/******************************************************************************

Welcome to GDB Online.
GDB online is an online compiler and debugger tool for C, C++, Python, Java, PHP, Ruby, Perl,
C#, OCaml, VB, Swift, Pascal, Fortran, Haskell, Objective-C, Assembly, HTML, CSS, JS, SQLite, Prolog.
Code, Compile, Run and Debug online from anywhere in world.

*******************************************************************************/
#include <iostream>

using namespace std;

int main()
{
    cout<<"we will print numbers from 1 to 20 using for loop"<<endl;

    for(int j=1;j<=20;j++)
{
        cout<<"the number is:"<<j<<endl;
}   

    return 0;
}
0 votes
answered 3 days ago by Gunda Bharath kumar (150 points)
cout<<"the number is:"<<j<<endl;
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.
...