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.

C++ | range propblem | Please help

0 votes
asked Apr 17, 2018 by consta
#include<iostream>
#include<conio.h>
#include<Windows.h>

#define cls system("cls");

using namespace std;

using namespace std;

struct user {
    unsigned short year;
    char name[10];
    char gender;
}user;

void main() {
    while (1) {
        cout << "\n Years range : 2001-2010\n";
        cout << "\a\n Enter the year : "; cin >> user.year;
        if (user.year >= 2001 || user.year<=2010 ) {
            break;
        }
        cout << "\a\a\n Out of range ! Please re-enter the year.";
        Sleep(1700);
        cls
 }

}

1 Answer

0 votes
answered Apr 17, 2018 by consta
PROBLEM FIXED By && !
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.
...