Hi, I have a program thats input a number and than output a number.
If number is three, than programm exit, but only first time. I need a program to exit every time i enter a number 3.
First time i enter other number than 3.
Second time if i enter 3 , my programm continues working.
Example
#include <iostream>
using namespace std;
int main() {
int a;
cout << " Enter a number " <<endl;
cin>>a;
switch(a) {
case 3:
cout << " You have entered 3, programm exit " << a << endl;
return 0;
default: cout << " Any other number than " << a << endl;