K
KEVO
#include <cstdlib>
#include <iostream>
#include <iomanip>
using namespace std;
int main(int argc, char *argv[])
{ // cw for charwidth & bw for billboard width
cout.setf(ios::fixed);
double bw, cw;
float numchars, spaceleft;
cout<<"bbwidth ? ";
cin>>bw;
cout<<"charwidth ? ";
cin>>cw;
numchars=(int)bw/(int)cw;
spaceleft= bw%cw; // i need the modulus but since its doube i get
error message
cout<<"numchar ? "<<setprecision(0)<<numchars<<endl;
cout<<"spaceleft ? "<<setprecision(6)<<spaceleft<<endl;
system("PAUSE");
return EXIT_SUCCESS;
}
#include <iostream>
#include <iomanip>
using namespace std;
int main(int argc, char *argv[])
{ // cw for charwidth & bw for billboard width
cout.setf(ios::fixed);
double bw, cw;
float numchars, spaceleft;
cout<<"bbwidth ? ";
cin>>bw;
cout<<"charwidth ? ";
cin>>cw;
numchars=(int)bw/(int)cw;
spaceleft= bw%cw; // i need the modulus but since its doube i get
error message
cout<<"numchar ? "<<setprecision(0)<<numchars<<endl;
cout<<"spaceleft ? "<<setprecision(6)<<spaceleft<<endl;
system("PAUSE");
return EXIT_SUCCESS;
}