This is comment for paste
Логические операции: сравнение / Задание 1
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Почему этот код не проходит, а проходит какой то левый код???
- #include <iostream>
- using namespace std;
- int main() {
- long double x, y, z;
- cin >> x >> y >> z;
- long double r = x + y;
- if (r != z) {
- cout << "Error. The sum of "s << x << " and "s << y << " is "s << r << endl;
- }
- }
- // тот самый левый код.....................
- #include <iostream>
- using namespace std;
- int main() {
- int x,y,z,sum,w;
- cin>>x>>y>>z;
- w=x+y;
- sum=z;
- if(x+y!=sum)
- {
- cout<<"Error. The sum of "<< x << " and "<< y << " is " << w <<endl;
- }
- else {
- cout<<"";
- }
- return 0;
- }
- // так... я понял почему не работало, я косякнул, с кем не бывает, но на эмуляторе все работало стабильно... хз чем не понравилось забивание через сайт
Advertisement
Add Comment
Please, Sign In to add comment