【C语言】scanf()输入浮点型数据
#include<stdio.h> int main() { double x1, x2, x3, x4; printf("输入2个浮点数x1,x2:\n"); scanf_s("%lf,%lf", &x1, &x2); printf("%lf,%lf\n", x1, x2); printf("输入浮点数x3,x4:\n"); scanf_s("%5lf,%lf", &x3, &x4); printf("%lf,%lf\n"); return 0; }
本文来自博客园,作者:木子欢儿,转载请注明原文链接:https://www.cnblogs.com/HGNET/p/11827979.html