You are on page 1of 2

#include <iostream.

h>
#include <conio.h>
int main()
{
clrscr();
int x,y,z,smallest;
cout << "Enter 3 integers : ";
cin>>x>>y>>z;
smallest=x;
if(y<smallest)
smallest=y;
if(z<smallest)
smallest=z;
cout << "The smallest integer out of the 3 integers you typed ";
cout << x << ", " << y << " & " << z << " is : " << "\n" << smallest << "\n";
getch();
return 0;
********************************************************************************
******************************
********************************************************************************
************************
********************************************************************************
***************************************
********************************************************************************
***********************
/C++ program : To check whether a given number is palindrome or not
#include
using namespace std;
int main()
{
int n, num, digit, rev = 0;
cout << "Enter a positive number: ";
cin >> num;
n = num;
do
{
digit = num%10;
rev = (rev*10) + digit;
num = num/10;
}while (num!=0);
cout << " The reverse of the number is: " << rev << endl;
if (n = = rev)
cout << " The number is a palindrome";
else
cout << " The number is not a palindrome";
system("pause");
return 0;
}
********************************************************************************
******************************
********************************************************************************
**************************
********************************************************************************
*****************************************
********************************************************************************

*************************

You might also like