In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
In this article Xiaobian for you to introduce in detail the "C language div () function example analysis", the content is detailed, the steps are clear, the details are handled properly, I hope this "C language div () function example analysis" article can help you solve your doubts, following the editor's ideas slowly in-depth, together to learn new knowledge.
Original function:
Div_t div (int numer, int denom)
Function description: div_t div (int numer, int denom) divides numer (numerator) by denom (denominator).
Parameters:
Return value:
The structure of the function return value definition is in, which has two members. For div_t:int quot; int rem
How to use the div () function:
# include
# include
Int main () {
Div_t output
Output = div (27,4)
Printf ("Quotient part of (29 / 4) =% d\ n", output.quot)
Printf ("Remainder part of (29thumb 4) =% d\ n", output.rem)
Output = div (27,3)
Printf ("Quotient part of (30 / 3) =% d\ n", output.quot)
Printf ("Remainder part of (30amp 3) =% d\ n", output.rem)
Return (0)
Compile and run the above program to produce the following results:
Quotient part of (29 / 4) = 7
Remainder part of (29ax 4) = 1
Quotient part of (30 / 3) = 10
Remainder part of (30Accord 3) = 0
Read this, the "C language div () function example analysis" article has been introduced, want to master the knowledge of this article also need to practice and use in order to understand, if you want to know more related articles, welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.