第三周 项目4(7)辩数字

来源:互联网 发布:android开源app源码 编辑:程序博客网 时间:2024/06/06 00:03
/* *Copyright(c)2014,烟台大学计算机与控制工程学院 *Allrights reserved. *文件名称:test.cpp *作者:肖雪 *完成日期:2016年3月29日 *版本号:v1.0 * *问题描述:辩数字 */#include <iostream>   using namespace std;    int main()  {      int x;  if( (x*(10*x+3+x))*(x*(10*x+3+x))==8000+110*x+9 && x<=9 &&x>=0)    cout<<"数字为:"<<x<<endl;    else  cout<<"无解"<<endl;    return 0;  }  

0 0
原创粉丝点击