Arithmetic Personal project Progress

Source: Internet
Author: User

First, the project requirements

Basic requirements: Write 10-20 arithmetic topics to the document, the program reads and outputs the problem, and calculates the correct results. The user calculates the answer to each question, answers the correct questions, and answers the wrong output. Record the number of correct and incorrect answers and output them separately.
Arithmetic topic Basic requirements:
1. All four operations of subtraction appear

3. Parentheses appear in the calculation
2. Calculation of True and false fractions
4. At least one arithmetic with a length of 10 (10 numbers of mixed operations)Ii. Progress of the project

I used C + + to write, the primary use of the class is a custom stack class:

Template <classT>classarrstack{Private:    intMsize;//the size of the sequential stack    intTop//stack Top pointerT *st;//Examples of Stacks Public: Arrstack (intSize) {msize =size; Top= -1; St=NewT[msize]; } arrstack () {top =-1; }    ~arrstack () {Delete[]st; }    BOOLPushConstT item);//into the stack    BOOLPop (T &item);//out of the stack    BOOLGetTop (T &item);//get top of stack element    BOOLIsEmpty ();//determine if the stack is empty    BOOLIsfull ();//determine if the stack is full    voidClear () {//Empty Stacktop =-1; }    BOOLGettwooperands (t &fst, T &AMP;SCD);//get stack top two elements and out of stack};

Several functions to be implemented by the program:

File read

Expression conversions

Calculation results

User interaction

Graphical interface or automatic generation of formulas

The function that can be implemented now is to read the calculation from a text file

The program calculates the result

Features that have not yet been implemented will be perfected in the future.

Arithmetic Personal project Progress

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.