ZHOU513723 2022-10-23 13:56 采纳率: 50%
浏览 6

怎么输出a的最大值?

img


怎么输出最大的a


#include<iostream>
#include <algorithm>
using namespace std;
int main()
{
    int a = 0;
    for (a = 1; a < 100; a++)
        if (a % 13 == 0)
            cout << a << endl;
}
  • 写回答

1条回答 默认 最新

  • 梦里逆天 2022-10-23 14:25
    关注
    #include<iostream>
    #include <algorithm>
    using namespace std;
    int main()
    {
        int a = 0;
        int ans;
        for (a = 1; a < 100; a++)
            if (a % 13 == 0)
                ans = a;
        cout << ans;
    }
    
    评论

报告相同问题?

问题事件

  • 创建了问题 10月23日

悬赏问题

  • ¥15 openFOAM DPMFoam
  • ¥15 将查询到的值,赋值到table指定行中
  • ¥50 docker容器内部启动shell脚本多命令
  • ¥15 请问python的selenium怎么设置referer
  • ¥15 请教下, VS QT 环境下, QTOPCUA 的源文件报错,这种情况咋查呢 ?
  • ¥20 UNITY webgl关于文档的上传和下载问题
  • ¥15 安霸cv22 + rtl8211f 千兆,udp传输丢包
  • ¥15 关于区块链和边缘环境搭建的相关问题
  • ¥15 windows远程桌面断卡重连软件卡顿问题
  • ¥30 Unity 实现扫描效果