Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update 02.cpp #437

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions DSA_C++/Cpp 50 ques/02.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,21 @@ class num{
int n;

void display(int n){
cout<<"entered number"<<n<<endl;
cout<<"entered number : "<<n<<endl;//this is a function within which we just print out the number that han been entered by the user
}
};

int main(){
int n;
cout<<"enter the number u want to display : ";
int m=1;
while(m==1){
cout<<"enter the number you want to display : ";
cin>>n;
num obj;
obj.display(n);
cout<<"if you want to exit entering the numbers enter 0 or if you like to continue enter 1 " <<endl;
cin>>m;
}

return 0;
}
}