zoukankan      html  css  js  c++  java
  • 06-0. 混合类型数据格式化输入(5)

    本题要求编写程序,顺序读入浮点数1、整数、字符、浮点数2,再按照字符、整数、浮点数1、浮点数2的顺序输出。

    输入格式:

    输入在一行中顺序给出浮点数1、整数、字符、浮点数2,其间以1个空格分隔。

    输出格式:

    在一行中按照字符、整数、浮点数1、浮点数2的顺序输出,其中浮点数保留小数点后2位。

    输入样例:

    2.12 88 c 4.7
    

    输出样例:

    c 88 2.12 4.70
    
     1 #include <stdio.h>
     2 
     3 int main()
     4 {
     5     double a, d;
     6     int b;
     7     char c;
     8     scanf("%lf %d %c %lf", &a, &b, &c, &d);
     9     
    10     printf("%c %d %.2lf %.2lf", c, b, a, d);
    11     
    12     return 0;
    13 } 
  • 相关阅读:
    大数减法
    MySQL配置的一些坑
    最大流_Edmonds-Karp算法
    最小生成树两连
    最短路三连
    对拍
    Broadcast
    Intent
    Custom Views
    Fragment
  • 原文地址:https://www.cnblogs.com/aexin/p/3876561.html
Copyright © 2011-2022 走看看