Reversing the digits

Source: Internet
Author: User

//Digital Flip#include <stdio.h>intMain () {unsignedintNumber =0; unsignedintRebmun =0; unsignedinttemp =0; //read the value to be reversedprintf"\nenter a positive integer"); scanf ("%u", &Number ); Temp=Number ; //reverse the number stored int temp     Do{Rebmun=Ten*rebmun + temp%Ten;//add rightmost digit of temp to rebum, move one digit to the front when performing an iteration//one of the last figures to the front, 23, become a.temp = temp/Ten;//remove it from temp            } while(temp); printf ("\nthe number%u is reversed is%u rebum\n", number, rebmun); return 0;} 

Ps:

Digits & Number:

Number , numeral , Digit and the Figure

Number,numeral,digit, and figure are all related to numbers, and some people use them as synonyms, but in fact they don't mean the same thing. So what is the specific difference?

number is an abstract quantitative concept (idea), invisible to touch. Its expression form (token/sign/symbol/name/mark/figure) is used to count (counting) and Measurement ( measurement), it can be seen. Usually use numeral to express number, of course, can also use gestures, sounds and other means.

numeral is a symbol of the quantity concept (represent), with different writing systems ( writing system), such as Roman numerals (roman numerals) "numeral XVII represents the Span lang= "en-US" >17 "and Indian Arabic numerals (hind-arabic numerals)" i.e. Arabic numerals ". Simply put, numeral is the number written out of the method. For example, the abstract quantity concept of three (threeness) can be specifically expressed as ' iii "," 11 "" Binary (binary) "," three "and other forms. numeral broadly refers to any symbol representing numbers, but narrowly refers to the Arabic numerals.

digit is a separate symbol used to express numeral (single symbol). Daily life with 0, 1, 2, 4 , 5, 6, 7, 8 and 90 Span lang= "en-us" >digit to express number. For example, numeral 153 consists of three digit " 1, 5 and 3 "to compose, numeral 9 by a digit" 9 "composition.

So,digit make up numeral, and numeral represents number . You can use words and letters to make an analogy. Letter makes up word, and Word stands for idea . For example, doghas a three-letter "D,O, and g" composition, while dog expresses the concept of ' dog '. You can also employ and name for example, numberis similar to a person, and numeral is his name, the name is not a person, but on behalf of the person. A person may have several names "scientific names, nicknames, nicknames, English name", but all refer to the same person.

Strictly speaking, refers to the numeral sign with numeral or figure, refers to the individual number to use the digit, other case uses number . Everyday words don't need to be so fussy about the difference between number and numeral, and you can usually replace numeral with number .

Number in daily use can refer to either literal form or digital form of quantity concept, so if the emphasis of the text form with spell out or word, and vice versa with figure ,digit or numeral. And write out seems to be both. For example:

l The small numbers, such as whole numbers smaller than ten, should is spelledout.

L Some experts say that any one-word number should is writtenout.

l Two-word numbers should is expressed in figures.

l with everyday writing and recipes-can use digits, like "4% of the Children" or "ADD 2 cups of Brown rice. "

l  you should use  numerals , not  Span style= "text-decoration:underline;" >words , when the number was a key value, an exact measurement value, or both. For example, with the sentence "Our Computer backup system uses 4 mm tape" The numeral was in order.

l rounded numbers over a million is written as a numeral plus a word. Use ' about million people speak Spanish natively, ' instead of ' about 400,000,000 people speak Spanish natively. " If You're using the exact number, you ' dwrite itout, of course. "Here write out should refer to numbers for exact numbers, not words"

Reversing the digits

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.