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

#define cls system("cls");

using namespace std;

using namespace std;

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

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 ) {
        cout << "\a\a\n Out of range ! Please re-enter the year.";


1 Answer

0 votes
answered Apr 17, 2018 by consta
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.