06-0. Mixed-type data formatting input (5)

Source: Internet
Author: User

Write a program to read floating point 1, integer, character, and floating point 2 in sequence, and then output the data in the order of character, integer, floating point 1, and floating point 2.

Input Format:

Enter floating point 1, integer, character, and floating point 2 in sequence in a row, which are separated by one space.

Output Format:

Output in the order of characters, integers, floating point numbers 1, and floating point number 2 in a row. The floating point number retains the last two digits of the decimal point.

Input example:

2.12 88 c 4.7

Output example:

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}

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.