Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- int main()
- {
- int a{ 10 };
- int b{ 3 };
- int c{ 1 };
- float aF{ 10 };
- float bF{ 3 };
- int tempI{ 0 };
- float temp{ 67.45678 };
- const double Pi{ 3.1415 };
- bool flag{ true };
- char symb{ 'A' };
- temp = (float)(a / b);
- tempI = aF / bF;
- flag = symb;
- // false = > 0, 0.0 '\0'; true - > rest;
- // false -> 0, 0.0, '\0'; true -> 1, 1.0, '\1';
- // std::cout << "c = " << c << '\n';
- std::cout << "temp = " << temp << '\n';
- // std::cout << "symb = " << symb << '\n';
- // std::cout << std::boolalpha << "flag = " << flag << '\n';
- // c = ((((a * b) + temp) * flag) + symb);
- // std::cout << "c = " << c << '\n';
- // (a*b)= 6(int)
- // ((a*b)+temp) = 73.45678(float)
- // (((a*b)+temp) * flag) => 73.45678(float)
- // ((((a * b) + temp) * flag) + symb) = 138.45678(float)
- // c = ((((a * b) + temp) * flag) + symb)
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement