Current location - Training Enrollment Network - Mathematics courses - The problem of% taking remainder in C language
The problem of% taking remainder in C language
Very simple, only one step is needed, that is, only one picture is needed: C language provides an operator% to take the remainder, which is called "modular" operator. Only two integers can perform modular operation! A% b means that a and quotient integer are divided by b to get the remainder.

Such as: 5%3 = 2, 4%3 = 1, 3%3 =0.

Extended data C language is a general computer programming language, which is widely used in the underlying development. The design goal of C language is to provide a programming language that can compile and process low-level memory in a simple way, generate a small amount of machine code and run without any support of running environment.

Although C language provides many low-level processing functions, it still maintains good cross-platform characteristics. C language programs written in standard specifications can be compiled on many computer platforms, even including some embedded processors (single chip microcomputer or MCU) and supercomputers.

In 1980s, in order to avoid the differences of C language grammar used by different developers, the American National Bureau of Standards formulated a complete set of American national standard grammar of C language, called ANSI C, as the original standard of C language. At present, the standard C 1 1 released by the International Organization for Standardization (ISO) and the International Electrotechnical Commission (IEC) on February 8, 2000 is the third official standard of C language, and it is also the latest standard of C language, which better supports Chinese character function names and.

C language is a process-oriented computer programming language, which is different from object-oriented programming languages such as C++ and Java.

Its compilers mainly include Clang, GCC, WIN-TC, SUBLIME, MSVC, Turbo C and so on.

References:

Baidu encyclopedia -c language