C implements the counter and rings to alert when it s time

Updated on technology 2024-04-11
20 answers
  1. Anonymous users2024-02-07

    You can write a new thread to ensure that the main thread does not freeze, perform an endless loop in the new thread, use the sleep function to make it sleep for a specified time in the loop, and when the time is up, you can use the output statement to output the 0x07, which seems to be a bell (you can check whether it is in the ascii code), and you can also output the time at that time, which requires library functions such as time t. As for the third question, you can use a configuration file to save the interval that needs to be ringed, and then read the file once when the new thread runs

    Do it yourself, train yourself. If it doesn't work, you can email me:

  2. Anonymous users2024-02-06

    I'm using a stack, and if I input an instruction if the priority is not higher, I will dispose of it directly. If the priority is too high, go to the stack. This is the algorithm of the one-line calculator.

    The two-line calculator calculation is completed by entering the expressions into the single-line calculator object in order. The focus is on prioritization. The specific function is relatively simple.

    That one-line calculator class only implements four arithmetic and parentheses, and now it can't be done. Basically, each key is written as a function, and it can be used naturally. Generally, a single line is sufficient.

    The double line is also made by adding an interpreter on the basis of a single line. If you want to directly operate on the double line, you need to have a lot of recursive algorithms, which is very troublesome to deal with. Also consider function flags.

    All operations have to be written in a function, and the modularity is too low.

  3. Anonymous users2024-02-05

    For general expressions, the landlord can convert them into suffix expressions, and then use stacks to deal with them, and if you do a monocular operation like this, it's actually pretty much the same. The landlord can consider not using the DOS environment, using other environments, or making a Windows window, which at least looks much better.

  4. Anonymous users2024-02-04

    You have to talk about what kind of computing requirements the computer needs, it's too vague.

  5. Anonymous users2024-02-03

    It's with a score.

    There are two functions.

    First, when the calculation result is a decimal place, you press it, then the result will be displayed as a fraction, if you press the key and then press it, the result will be displayed as a false fraction.

    Second, when you enter a fraction, you need to use this key, if the input is not with a fraction, then you should enter the numerator first, then press the key, and then enter the denominator.

    If you want to enter a fraction, then you first enter the integer before the fraction, then press the key, then enter the numerator, press the key, and then enter the denominator.

  6. Anonymous users2024-02-02

    is the fractional line of the fraction, before this sign is the numerator, and after this is the denominator.

  7. Anonymous users2024-02-01

    For some reason, the first volume of the fourth grade math book clearly states that the CE key is a correction key to ensure reliability, and Xiao Zhang listed the full text: the calculator also has some function keys that can help us solve many problems.

    If you accidentally press 456 to 455 when calculating 123+456, just do the following: 123+455ce456=you will know the exact answer 579, and you don't need to clear it all and press it again.

    Xiao Zhang, I am a children's shoe, I have just learned, if other students see it, agree with Xiao Zhang! However, C=CE, individual calculators will have such differences. There is page 103 of the second volume of the fourth grade math book of the Sujiao edition!

  8. Anonymous users2024-01-31

    Clear Input (CE).

    When typing a number, press the corresponding number key, and if you press the wrong number, the (CE) key can be used to erase the value once, and then re-enter the correct number.

    If you want to lose 9*7, but you enter 9*8, and the display shows 8 (incorrect), press the CE key, then it will only clear 8 (the display will display"0"), then you press 7 again, then press = (63 will appear on the display).

    Clear key (c).

    Clear the data, all data and calculations are cleared, reset to zero.

  9. Anonymous users2024-01-30

    The C button clears everything you've ever typed, while the CE only clears the most recent type.

    For example, if you enter 1+2+ and you haven't entered the = sign at this time, the result shows that it is 3, if you press CE, then the above 1+2+ will disappear.

    If you press C, the displayed result 3 is gone, you can continue to enter the number 1, and then the dot is equal to 4.

  10. Anonymous users2024-01-29

    Clear Input Key (CE): Pressing this key during digital input will clear the value in the input register and display it"0".

  11. Anonymous users2024-01-28

    It's all zero key, the difference:

    The C key is all cleared, and all the previous numbers are cleared.

    The CE key clears only the line of numbers you entered at that time (i.e. the line of numbers displayed on the screen at that time) and does not affect the previous entry.

  12. Anonymous users2024-01-27

    It's easy.

    It is up to you to judge.

    Set the default value of the input box to. That's it. When you click to enter, you will determine whether this point exists. Then set the value of the input box to when you put it back. That's it.

    It has been calculated according to the algorithm of the previous click according to the = program. It's just a very simple status logging feature.

    You can set a global variable. The function of this variable lies in the algorithm that records the last click.

    Set another global variable. The result of the last calculation is recorded.

    Then write a method. There are several methods to be implemented in it. According to the input algorithm parameters, it is enough to determine what kind of calculation needs to be performed.

    The two calculated values are the result of the last calculation and the value in the input box. Then return the result or simply give the calculation result a value to the input box. Just don't forget to update those two global variables.

  13. Anonymous users2024-01-26

    The last little dot'Just add the data at the end of the assignment to the textbox, for example.

    number

    .";where number is the result you calculated. The second equal sign is actually the number adding itself; For example, if I have entered 1+2, if I press the minus sign "-", the result of 1+2 will be calculated first, and then it will be displayed.

    In fact, the calculation of Microsoft Calculator is the operation of the stack.

  14. Anonymous users2024-01-25

    Here's an idea.

    1.The last note: The result of the calculation in WinForm is displayed and converted to the string type, and you add the result tostring()."."On display on it.

    2.Press the equal sign number to change: Calculators generally only have two calculation modes Monocular and binocular Aside from the monocular operation of x squared, the general mode of binocular operation is x op y = ?

    So record the variables x, y and operator op involved in the operation, and just display the result of x op y and assign the result to x in the event of the equal sign button.

    3. "1" "+" "2" "+" "="The result is 6: 3 can be solved according to the design of 2.

  15. Anonymous users2024-01-24

    The decimal point question ha.

    Add ** to the keypress event of your decimal point text box, if txtbox1 is the text box you display.

    With if(".")>1)

    The second and third should be considered a problem.

    You start by setting a global variable bool preesd=true and copying it to true under your number button.

    Then write in the click event of your "=" button.

    preesd=true;

    if(bool)

    Else I hope to help you solve the problem.

  16. Anonymous users2024-01-23

    Well, I only have one of my previous course designs, VC++ to do a scientific calculator that can switch between general and science, do you want to? Send me your email address if you want. (and some bugs).

    The "Ultimate Edition" has been sent to you.

    You should be satisfied, right?

  17. Anonymous users2024-01-22

    I did it myself a long time ago, MFC's.

  18. Anonymous users2024-01-21

    Enter an expression, such as 2+(3*(-45) 2).

    Maybe the verification is not very good, but this program is absolutely original, absolutely safe and stable

  19. Anonymous users2024-01-20

    * Addition, subtraction, multiplication and division of floating-point numbers.

    Just enter the expression, such as 2+(3*(-45) 2) may not be very good at verifying, but this program is absolutely original, absolutely safe and stable, a night's hard work, I hope the landlord likes * include

    #include

    #include

    #define isdigit(a) (a>='0'&&a<='9')?true:false

    char str[100];

    int len;

    All algorithms, which are needed for processing, add * const char a[10][10]=;

    Convert string numbers to double*

    double gainnum()

    while(isdigit(str[len]))if(str[len]=='.')

    if(iszheng)

    return re;

    return -re;

    Addition, subtraction, multiplication and division

    double operate(double a,double b,char theta)

    Compare Operator Priority

    char compare(char op1,char op2) *validation, new, relatively simple, hehe*

    bool yanzheng(char* s)return true;

    main()

    len=0;

    str[strlen(str)+1]='\0';

    str[strlen(str)]='#

    #ch=str[len];

    while(ch!='##')else}}

    printf("%lf",;

  20. Anonymous users2024-01-19

    CE is the abbreviation of Clear Entry, which means to clear the entry, and the function is to clear the screen to zero, and the previous operation result is cleared. This function is designed to clear the calculated value by clearing the register value in the arithmetic register.

    And C just clears a number. The results of the previous calculations will not be known. After pressing C, you can continue to calculate on the previous result.

Related questions
11 answers2024-04-11

1. First of all, you need to determine the power supply end, as shown in the figure below. >>>More

16 answers2024-04-11

Counter on jump rope.

It is divided into two types, mechanical and electronic, and the principles are as follows: >>>More

17 answers2024-04-11

Wuxi Riheng Electronic Technology **** has been doing this table for more than 10 years, you can check their company**. The technical service is in place. They **0510-83505557

11 answers2024-04-11

The number of numerators can be registered.

d, for example, out c235 d0, and then use the screen to enter the value of d1d0. Because C235 is a 32-bit counter. >>>More

16 answers2024-04-11

Isn't this thing just a digital tube displaying 16 digits? Prompt you 16 times to get there, let go after you think to press the stop button. If so, the procedure is available for reference: >>>More