这道题如何写编程


慕瑄宸
浏览 1543回答 2
2回答

xungeer29

#include<iostream> using namespace std; int main() {  double x, y, z;  cout << "Enter x,y,z: " << endl;  cin >> x >> y >> z;  if (z == (x + y))   cout << "x+y=z"<< endl;  else   cout <<"x+y!=z"<< endl;  return 0; }

xungeer29

#include<iostream> using namespace std; int main() {  double x, y, z;  cout << "Enter x,y,z: " << endl;  cin >> x >> y >> z;  if (z == (x + y))   cout << x << "+" << y << "=" << z << endl;  else   cout << x << "+" << y << "!=" << z << endl;  return 0; }
打开App,查看更多内容
随时随地看视频慕课网APP