Tak sem zkousel si vytvorit nekolik vlastnich programku podle 2.lekce (uz sem pokrocil :D ) a zas mam drobny problem:
Tohle mi jede:
// Integer_and_real_division
#include <iostream>
using namespace std;
long main ()
{
int A = 18, B = 7;
cout << "Integer: " << A << ", " << B << endl ;
cout << "Integer division: " << A / B << endl ;
cout << "Remain: " << A % B << endl << endl ;
cin.get();
return 0;
}
(Melo by to pro dana dve cisla vypsat jejich celociselny podil a pak zbytek po deleni)
Pak sem jeste chtel vytvorit podle navodu realne deleni:
(Tak, aby se na obrazovku vypsalo 2,57142857..)
// Integer_and_real_division
#include <iostream>
using namespace std;
long main ()
{
int A = 18, B = 7;
cout << "Integer: " << A << ", " << B << endl ;
cout << "Integer division: " << A / B << endl ;
cout << "Remain: " << A % B << endl << endl ;
cin.get();
double (A);
double (B);
cout << "Real: " << A << ", " << B << endl ;
cout << "Real division: " << A / B << endl ;
cin.get();
return 0;
}
Ale tohle mi nejak nechce jet..
Nevite, kde mam chybu?? Pise mi to nejaky problem s pretypovanim. Dik