//P-8 Type casting or Type conversion
#include <iostream.h>
#include <conio.h>
void main()
{
int a, b;
float c;
clrscr();
cout << "Enter value A = ";
cin >> a;
cout << "Enter value B = ";
cin >> b;
c = (float)a / b;
cout << "Division = " << c;
getch();
}
Comments
Post a Comment