#include "stdafx.h" #include <iostream> #include <iomanip> using namespace std;
int main() { int a, b, c; cout << "a,b,c="; cin >> a >> b >> c; cout << a << "+" << b << "+" << c << "=" << a + b + c << endl; cout << a << "*" << b << "*" << c << "=" << a * b * c << endl; cout << "(" << a << "+" << b << "+" << c << ")/3" << "=" << fixed << setprecision(3) << (a + b + c)/3.0 << endl; system("pause"); }
0 votes Thanks 0
clinteastwood2
ошибка раз error: stdafx.h: No such file or directory два error: pause: not found не все пишут в VS
int main() { int a, b, c; cout << "a,b,c="; cin >> a >> b >> c; cout << a << "+" << b << "+" << c << "=" << a + b + c << endl; cout << a << "*" << b << "*" << c << "=" << a * b * c << endl; cout << "(" << a << "+" << b << "+" << c << ")/3" << "=" << fixed << setprecision(3) << (a + b + c)/3.0 << endl; system("pause"); }
Подробнее - на Znanija.com - https://znanija.com/task/28459379#readmore
Giammy
#include #include #include using namespace std;
int main() { int a, b, c; cout << "a,b,c="; cin >> a >> b >> c; cout << a << "+" << b << "+" << c << "=" << a + b + c << endl; cout << a << "*" << b << "*" << c << "=" << a * b * c << endl; cout << "(" << a << "+" << b << "+" << c << ")/3" << "=" << fixed << setprecision(3) << (a + b + c)/3.0 << endl; getch(); }
Answers & Comments
#include "stdafx.h"
#include <iostream>
#include <iomanip>
using namespace std;
int main() {
int a, b, c;
cout << "a,b,c="; cin >> a >> b >> c;
cout << a << "+" << b << "+" << c << "=" << a + b + c << endl;
cout << a << "*" << b << "*" << c << "=" << a * b * c << endl;
cout << "(" << a << "+" << b << "+" << c << ")/3" << "=" << fixed << setprecision(3) << (a + b + c)/3.0 << endl;
system("pause");
}
два error: pause: not found
не все пишут в VS
#include
using namespace std;
int main() {
int a, b, c;
cout << "a,b,c="; cin >> a >> b >> c;
cout << a << "+" << b << "+" << c << "=" << a + b + c << endl;
cout << a << "*" << b << "*" << c << "=" << a * b * c << endl;
cout << "(" << a << "+" << b << "+" << c << ")/3" << "=" << fixed << setprecision(3) << (a + b + c)/3.0 << endl;
system("pause");
}
Подробнее - на Znanija.com - https://znanija.com/task/28459379#readmore
#include
#include
using namespace std;
int main() {
int a, b, c;
cout << "a,b,c="; cin >> a >> b >> c;
cout << a << "+" << b << "+" << c << "=" << a + b + c << endl;
cout << a << "*" << b << "*" << c << "=" << a * b * c << endl;
cout << "(" << a << "+" << b << "+" << c << ")/3" << "=" << fixed << setprecision(3) << (a + b + c)/3.0 << endl;
getch();
}
iomanip
conio.h