The colleagues in the morning, asked me a very basic problem.

xiaoxiao2021-03-30  210

34.5 MOD 3.5 results?

I have forgotten that I can only be an integer. I use VC to compile it. The result is 1, the feeling is good, I have forgotten, I have time, I have a good complement.

#include main () {Double X, Y; Double Sum, Minus, Product, Quotient; Int Remainder; Printf ("Please enter 2 numbers and separately separated, type the carriage return after the input is complete! / N "); while ("% LF,% LF ", & X, & Y)! = EOF) {SUM = x y; minus = xy; product = x * y; quotient = x / y; printf (" The following is calculation results: / n "); // Print the calculation result // Printf (" x =% D, Y =% D / N ", (int) x, (int) y); printf (", and :% 10.2F / n ", SUM); Printf (" difference:% 10.2f / n ", minus); Printf (" accumulated:% 10.2f / n ", product; printf (" Business:% 10.2F / n ", quotient; remainder = (int) x% (int) y; printf (" remaining:% 6d / n ", remainder);} getch ();}

Also solve the English Windows running program garbled problem:

Install Simplified Chinese Language Pack (MUI), you can go to http://www.lm8.cn/softview/softview_256.html to download a multi-country language package, then you only need to switch in the area and language options after installation.

转载请注明原文地址:https://www.9cbs.com/read-130736.html

New Post(0)