answersLogoWhite

0

Here's how you do that in C++:

#include <iostream>

#include <cstdio>

#include <cstdlib>

using namespace std;

int main()

{

int currentnumber = 0;

while (currentnumber <= 100) // exit loop when number equals 100

{

cout << currentnumber << endl; //output number and newline

currentnumber++; //increment variable to the next number

}

system("PAUSE"); //pause program so user can see results

return 0; //terminate program and hand control back to the operating system

User Avatar

Wiki User

10y ago

What else can I help you with?

Continue Learning about Engineering
Related Questions

Can you print some message on the console without using main in java?

By using the static block


How do you print on console without using printf or puts in c language?

write, putchar, putc, fputc etc


How can you get the Pokemon Ranch?

My Pok&eacute;mon Ranch is an application that can only be downloaded as WiiWare using the Nintendo Wii console.


How come print media is helped by the application of e business system?

by using ebusiness system print media was helped in the following ways


What if your printer only prints 2 pages per sheet?

It should only print one page per sheet. Check all the print settings and ensure the printer and the application you are using are set to print on the size of paper you are using.


How do you print strings and numbers in single statement by using C language?

With printf.Example:for (i=0; i


How do you print even number in qbasic?

In QBasic, you can print even numbers using a simple loop. For example, you can use a FOR loop to iterate through a range of numbers and then check if each number is even by using the modulus operator (MOD). Here's a sample code snippet: FOR i = 1 TO 20 IF i MOD 2 = 0 THEN PRINT i NEXT i This code will print all even numbers from 1 to 20.


How do you add page numbers using word pad?

To add page numbers in word pad, you go into page setup. At the bottom of the pop-up, there will be a box that says "print page numbers". Check that box and page numbers will appear when you print the document.


How do you print numbers as even numbers in a loop in qbasic?

To print even numbers in a loop in QBasic, you can use a FOR loop to iterate through a range of numbers and check if each number is even. An even number can be identified using the modulus operator (MOD). Here's a simple example: FOR i = 1 TO 20 IF i MOD 2 = 0 THEN PRINT i END IF NEXT i This code will print all even numbers from 1 to 20.


What is the program to print odd number using for next loop in GE BASIC?

In GE BASIC, you can print odd numbers using a FOR-NEXT loop by specifying a starting point and incrementing by 2. Here’s a simple example: FOR I = 1 TO 99 STEP 2 PRINT I NEXT I This will print all odd numbers from 1 to 99. The STEP 2 ensures the loop only increments by 2, thereby producing only odd numbers.


Using console application show the use of inheritance in your program?

inheritance is purpose of deriving one class from other class and it is reusabilty of code..


You are using qbasic from windows xp and need the command to handshake wit h Epson stylus color 600?

To print text to the computer console screen use... PRINT "Text" To print text to the default printer/and, paper; instead, use... LPRINT "Text"