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;
}

沒有留言:

張貼留言

Node-Red Dashboard UI Template + AngularJS 參考 AngularJS教學 --3

  Node-Red Dashboard UI Template + AngularJS 參考 AngularJS教學 --3 AngularJS 實例 <!DOCTYPE html> <html> <head> <meta charse...