Search
 
SCRIPT & CODE EXAMPLE
 

CPP

C++ Display Numbers from 1 to 5

// C++ Program to print numbers from 1 to 5

#include <iostream>

using namespace std;

int main() {
    int i = 1; 

    // do...while loop from 1 to 5
    do {
        cout << i << " ";
        ++i;
    }
    while (i <= 5);
    
    return 0;
}
Comment

PREVIOUS NEXT
Code Example
Cpp :: generate consecutive numbers at compile time 
Cpp :: declare static table filled cpp 
Cpp :: github static std::string gen_name() { } // To do static int gen_number() { } // To do static int gen_grade() { } // To do double compute average() { } // To do 
Cpp :: store binary data in buffer 
Cpp :: no argument but return value in c++ 
Cpp :: c++ ignore_line 
Cpp :: test3 
Cpp :: https://www.google 
Cpp :: C++ Dynamic allocation failing 
Cpp :: ue4 foreach loop c++ 
Cpp :: how to make a substring after certain position 
Cpp :: time out search element in linked list c++ 
Cpp :: c++ operators 
Cpp :: windows install cppcheck 
Cpp :: inverse elment of array c++ 
Cpp :: Swift if...else Statement 
Cpp :: Smooth Poti values on Arduino 
Cpp :: gcd of two number in c++ stl 
Cpp :: c++ server service ros 
Cpp :: print all chrchetrs of a string c++ 
Cpp :: c++ cout 
Cpp :: c++ vector remove element by value 
Cpp :: how to include a library in arduino 
Cpp :: how to make sound in c++ 
Cpp :: c++ delete int 
C :: c colour text 
C :: arduino wifi ip address to string 
C :: zizag c 
C :: simplify fractions C 
C :: how to shutdown system c++ 
ADD CONTENT
Topic
Content
Source link
Name
4+7 =