Do In Lab (11-02-2013)

posted Feb 10, 2013, 10:01 PM by Salah Ibrahim   [ updated Feb 10, 2013, 10:02 PM by Karwan Jacksi ]
Q1: write a c++ program, use while loop to enter a number, and the loop works 
        continuously until you enter an even number.
        --------------------------------------------
            Enter a number : 1
            Enter a number : 5
            Enter a number : 9
            Enter a number : 2
            Press any key to continue...




Q2: write a c++ program that enables you to enter numbers one by one, 
        the program stores negative numbers on a file and if a positive number entered the program will exit.
        --------------------------------------------
            Enter a number : -22
            Enter a number : -35
            Enter a number : -9
            Enter a number : 2
            Press any key to continue...




Q3: write a c++ program loop that works [from 1 to 10] and only prints numbers that are even
        --------------------------------------------
            2 4 6 8 10
            Press any key to continue...
Comments