Using Float :-

 #include<iostream>

#include<iomanip>

using namespace std;

int main (){

int x,y,d,z;

cout<<"first integer value  : ";

cin>>x;

cout<<endl<<"second integer value  : ";

cin>>y;

d = static_cast<float>(z = x/y);

cout<<endl<<"result  :  "<<d;

return 0;

}



Comments

Popular Posts