2839 - 求两数的整数商 和 商
求两数的整数商 和 商 ,商保留两位小数
Input
一行 两个整数
Output
一行,一个整数,一个实数(两位小数)
Examples
Input
12 8
Output
1 1.50
Solution C++
#include<iostream> #include<cstdlib> #include<cstdio> using namespace std; int main() { float a,b; int c; float d; cin>>a>>b; c=a/b; cout<<c<<" "; d=a/b; printf("%.2f",d); //system("pause"); return 0; }