2019年6月26日 星期三

C語言(online c) (寫簡單的 程式 印出1..100 之間 6的倍數的數值)

C語言(online c) (寫簡單的 程式 印出1..100 之間 6的倍數的數值)

#include<stdio.h>
#include<math.h>
int main()
{
    printf("請印出1..100之間6的倍數的數\n");
    for(int i=1;i<=100;i++)
    {
        if(i%6==0)
            printf("%d\t",i);
    }
   
    return 0;
}       

請印出1..100之間6的倍數的數
6 12 18 24 30 36 42 48 54 60 66 72 78 84 90 96

沒有留言:

張貼留言

2026 作業1 MQTT基本觀念

 2026 作業1MQTT基本觀念 作業  參考下面網址 https://alex9ufoexploer.blogspot.com/2025/02/1-mqtt-relay-dht22-mqtt-box-pc-mymqtt.html https://alex9ufoexploer...