2018年12月22日 星期六

DEV c++ Scanf input

DEV C++ 輸入 數字 Scanf 

    double y[5];
    scanf("%lf", &y[i]);








#include <stdio.h>
#include <stdlib.h>

/* run this program using the console pauser or add your own getch, system("pause") or input loop */

int main(int argc, char *argv[]) {
    double y[5],z[5];
    int i;
    for (i=0;i<=4;i++)
{
        printf("enter a y[] number: ");
    scanf("%lf", &y[i]);
        printf("enter a z[] number: ");
    scanf("%lf", &z[i]);   
    printf("%lf\n", y[i]);
    printf("%lf\n", z[i]);
   
}


    printf("enter any key to exit");
    fflush(stdin);
    getchar();
return 0;
}

沒有留言:

張貼留言

MQTT WS HMI 與 Wokwi ESP32 連線的資訊透過HiveMQ

MQTT WS HMI 與 Wokwi ESP32 連線的資訊透過HiveMQ     https://console.hivemq.cloud/clusters 當您進入 HiveMQ Cloud Console 的 Clusters 頁面時,您的目標是取得能讓 MQTT W...