I don't know.

Source: Internet
Author: User

I don't know.

/* The description of as we all know won't help me. Oh, of course, this time I still don't. I just want you to translate the numbers for me. The so-called translation is to read a number in Chinese. It's easy, please be patient. The numbers are in Chinese: 0, 1, 2, 3, Si, Wu, Lu, Wei, Wei, Shi, Xiao, Xiao, Min, and Min. make sure that the input value is within the int range. The output is written in the Chinese language I gave you. The sample is input. The sample is output. * // * Enter a four-digit number: 1245, and. */# include <stdio. h> # include "string. h "int main (int argc, const char * argv []) {// insert code here... int n; printf ("Enter 4 digits: \ n"); scanf ("% d", & n); int a, B, c, d; // single digit d = n % 10; // ten digits c = n % 100/10; // hundreds of BITs B = n % 1000/100; // thousands of bits a = n/1000; char * s [255] = {"zero", "one", "two", "yellow", "Si", "Wu", "Lu", "Lu ", "condition", "condition"}; if (a = 0 & B = 0 & c = 0 & d! = 0) {printf ("% s \ n", s [d]);} else if (a = 0 & B = 0 & c! = 0 & d! = 0) {printf ("% s ten % s \ n", s [c], s [d]);} else if (a = 0 & B = 0 & c! = 0 & d = 0) {printf ("% s ten \ n", s [d]);} else if (a = 0 & B! = 0 & c! = 0 & d! = 0) {printf ("% s hundred % s ten % s \ n", s [B], s [c], s [d]);} else if (a = 0 & B! = 0 & c! = 0 & d = 0) {printf ("% s hundreds % s ten \ n", s [B], s [c]);} else if (a = 0 & B! = 0 & c = 0 & d = 0) {printf ("% s hundred \ n", s [B]);} else if (! = 0 & B! = 0 & c! = 0 & d! = 0) {printf ("% s thousands % s hundreds % s ten % s \ n", s [a], s [B], s [c], s [d]);} else if (! = 0 & B! = 0 & c! = 0 & d = 0) {printf ("% s thousands % s hundreds % s ten \ n", s [a], s [B], s [c]);} else if (! = 0 & B! = 0 & c = 0 & d = 0) {printf ("% s \ n", s [a], s [B]);} else if (! = 0 & B = 0 & c = 0 & d = 0) {printf ("% s thousands \ n", s [a]);} else if (! = 0 & B = 0 & c = 0 & d! = 0) {printf ("% s thousands of zeros % s \ n", s [a], s [d]);} else {printf ("enter the correct number !! \ N ") ;}return 0 ;}

 

Related Article

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.