the first one
Code:
#include <iostream>
#include <conio.h>
using namespace std;
main ()
{
int a,b,sum,dif,prod,quot;
cout << " \n Enter the First number: ";
cin >> a;
cout << " \n Enter the Second number: ";
cin >> b;
sum = a + b;
dif = a - b;
prod = a * b;
quot = a / b;
cout << " \n The sum is: "<< sum ;
cout << " \n The difference: "<< dif ;
cout << " \n The Product is: "<< prod;
cout << " \n The quotient is: "<< quot;
cout << " \n \n \n ";
return main();
getch();
}
Code:
#include <iostream>
#include <conio.h>
using namespace std;
main()
{
int a, b;
char response;
cout << "*************************************** \n";
cout << " \t INPUT THE DAY NUMBER: " ;
cin >> a;
if (a==1)
cout << " \t THE DAY IS MONDAY\n " ;
if (a==2)
cout << " \t THE DAY IS TUESDAY\n " ;
if (a==3)
cout << " \t THE DAY IS WEDNESDAY\n " ;
if (a==4)
cout << " \t THE DAY IS THURSDAY\n " ;
if (a==5)
cout << " \t THE DAY IS FRIDAY\n " ;
if (a==6)
cout << " \t THE DAY IS SATURDAY\n " ;
if (a==7)
cout << " \t THE DAY IS SUNDAY\n " ;
return main();
getch();
}




) one last thing after they use one of the following a question will prompt asking if they want to use it again? 'Y' or 'N' and if 'Y' then it will return to Int Main () if 'N' it will close? hehe
block and add a menu option, e.g. 8 Quit, and make case 8 return 0; Then the program will quit when they select 8; this is better than having a separate Y/N prompt to continue or quit. Think about the design, if you have several tasks to perform with the program, you would want to run them one after the other then select quit when you're done; you don't want to be asked whether or not to continue after every operation.