#include <iostream.h>
#include <conio.h>
/* function 1 */
void inquote(int a)
{
cout<< "\n The value to be printed is \" " << a << " \" ";
}
/* function 2 */
void inquote(double a)
{
cout<< "\n The value to be printed is \" " << a << " \" ";
}
/* function 3 */
void inquote(char a)
{
cout<< "\n The value to be printed is \" " << a << " \" ";
}
void main()
{
int integer;
double dou;
char ch;
/* function 1 is called */
cout<< "\n Enter an integer :";
cin>> integer;
inquote(integer);
/* function 2 is called */
cout<< "\n Enter a decimal value :";
cin>> dou;
inquote(dou);
/* function 3 is called */
cout<< "\n Enter a character :";
cin>> ch;
inquote(ch);
getch();
}
No comments:
Post a Comment