Testing Arithmetic Knowledge-开源

  • V7_954630
    了解作者
  • 375.1KB
    文件大小
  • zip
    文件格式
  • 0
    收藏次数
  • VIP专享
    资源类型
  • 0
    下载次数
  • 2022-06-16 02:43
    上传日期
有了这个应用程序,您可以训练您的算术! 加,减,乘,除! 试试这个应用程序!
Testing Arithmetic Knowledge.zip
  • Testing Arithmetic Knowledge Portugu坰.exe
    10KB
  • MSVCR100.dll
    743.3KB
  • Source code of Testing Arithmetic Knowledge program.txt
    7KB
  • Testing Arithmetic Knowledge English.exe
    10KB
  • About execution of application.txt
    647B
内容介绍
The language of programing of this application is C \\In the stdafx.h's file: #pragma once #include "targetver.h" #include <stdio.h> #include <tchar.h> #include <stdlib.h> #include <time.h> void wait_a_second (); \\In the Testing Arithmetic Knowledge.cpp's file: #include "stdafx.h" void main(){ int option,maxLimit,status=1,num1,num2,answer,result,resul=0,continu=1,correct=0,incorrect=0,choice=0,option1,m; srand(time(NULL)); printf("Now we will train your arithmetical knowledge!\n\n"); do{ printf("Sums -> 1\nSubtractions -> 2\nMultiplications -> 3\nDivisions -> 4\n(Enter the number of its option and press the enter button)\n\n"); scanf("%d",&option); if(option==1){ incorrect=0; correct=0; choice=0; printf("Enter the upper limit for doing sums!\n"); scanf("%d",&maxLimit); maxLimit++; status=1; while(status==1){ choice=0; system("cls"); result=0; num1=rand()%maxLimit; num2=rand()%maxLimit; result=num1+num2; printf("%d+%d=?\n",num1,num2); scanf("%d",&answer); if(result==answer){ printf("\nCongratulations! You got it!\n"); correct++; wait_a_second (); wait_a_second (); if(correct%5==0){ printf("Do you want to do more sums? (Yes -> 1 / No -> 0)\n"); scanf("%d",&status); } } else{ while(answer!=result&&choice!=1){ incorrect++; if(incorrect%3==0){ printf("Do you want to know the answer? (Yes -> 1 / No -> 0)\n"); scanf("%d",&choice); m=1; } if(choice==1){ printf("%d+%d=%d\n",num1,num2,result); } else{ printf("Do you want to try again? (Yes -> 1 / No -> 0)\n"); scanf("%d",&option1); if(option1==1){ printf("\Try again!\n"); printf("%d+%d=?\n",num1,num2); scanf("%d",&answer); } if(option1==0){ answer=result; m=1; } } }if(m!=1){ printf("\nCongratulations! You got it!\n"); correct++; m=0; } wait_a_second (); wait_a_second (); if(correct%5==0){ printf("Do you want to do more sums? (Yes -> 1 / No -> 0)\n"); scanf("%d",&status); } } } } if(option==2){ incorrect=0; correct=0; choice=0; printf("Enter the upper limit for doing subtractions!\n"); scanf("%d",&maxLimit); maxLimit++; status=1; while(status==1){ system("cls"); result=0; choice=0; num1=rand()%maxLimit; num2=rand()%maxLimit; result=num1-num2; printf("%d-%d=?\n",num1,num2); scanf("%d",&answer); if(result==answer){ printf("\nCongratulations! You got it!\n"); correct++; wait_a_second (); wait_a_second (); if(correct%5==0){ printf("Do you want to do more subtractions? (Yes -> 1 / No -> 0)\n"); scanf("%d",&status); } } else{ while(answer!=result&&choice!=1){ incorrect++; if(incorrect%3==0){ printf("Do you want to know the answer? (Yes -> 1 / No -> 0)\n"); scanf("%d",&choice); m=1; } if(choice==1){ printf("%d-%d=%d\n",num1,num2,result); } else{ printf("Do you want to try again? (Yes -> 1 / No -> 0)\n"); scanf("%d",&option1); if(option1==1){ printf("\Try again!\n"); printf("%d-%d=?\n",num1,num2); scanf("%d",&answer); } if(option1==0){ answer=result; m=1; } } } if(m!=1){ printf("\nCongratulations! You got it!\n"); correct++; m=0; } wait_a_second (); wait_a_second (); if(correct%5==0){ printf("Do you want to do more subtractions? (Yes -> 1 / No -> 0)\n"); scanf("%d",&status); } } } } if(option==3){ incorrect=0; correct=0; choice=0; printf("Enter the upper limit for doing multiplications!\n"); scanf("%d",&maxLimit); maxLimit++; status=1; while(status==1){ choice=0; system("cls"); result=0; num1=rand()%maxLimit; num2=rand()%maxLimit; result=num1*num2; printf("%d*%d=?\n",num1,num2); scanf("%d",&answer); if(result==answer){ printf("\nCongratulations! You got it!\n"); correct++; wait_a_second (); wait_a_second (); if(correct%5==0){ printf("Do you want to do more multiplications? (Yes -> 1 / No -> 0)\n"); scanf("%d",&status); } } else{ while(answer!=result&&choice!=1){ incorrect++; if(incorrect%3==0){ printf("Do you want to know the answer? (Yes -> 1 / No -> 0)\n"); scanf("%d",&choice); m=1; } if(choice==1){ printf("%d*%d=%d\n",num1,num2,result); } else{ printf("Do you want to try again? (Yes -> 1 / No -> 0)\n"); scanf("%d",&option1); if(option1==1){ printf("\Try again!\n"); printf("%d*%d=?\n",num1,num2); scanf("%d",&answer); } if(option1==0){ answer=result; m=1; } } } if(m!=1){ printf("\nCongratulations! You got it!\n"); correct++; m=0; } wait_a_second (); wait_a_second (); if(correct%5==0){ printf("Do you want to do more multiplications? (Yes -> 1 / No -> 0)\n"); scanf("%d",&status); } } } } if(option==4){ incorrect=0; correct=0; choice=0; printf("Enter the upper limit for doing divisions!\n"); scanf("%d",&maxLimit); maxLimit++; status=1; while(status==1){ choice=0; num2=0; resul=0; system("cls"); while(resul==0){ num1=rand()%maxLimit; while(num2==0){ num2=rand()%maxLimit; } if(num1%num2==0){ resul=1; } result=num1/num2; } printf("%d/%d=?\n",num1,num2); scanf("%d",&answer); if(result==answer){ printf("\nCongratulations! You got it!\n"); correct++; wait_a_second (); wait_a_second (); if(correct%5==0){ printf("Do you want to do more divisions? (Yes -> 1 / No -> 0)\n"); scanf("%d",&status); } } else{ while(answer!=result&&choice!=1){ incorrect++; if(incorrect%3==0){ printf("Do you want to know the answer? (Yes -> 1 / No -> 0)\n"); scanf("%d",&choice); m=1; } if(choice==1){ printf("%d/%d=%d\n",num1,num2,result); } else{ printf("Do you want to try again? (Yes -> 1 / No -> 0)\n"); scanf("%d",&option1); if(option1==1){ printf("\Try again!\n"); printf("%d/%d=?\n",num1,num2); scanf("%d",&answer); } if(option1==0){ answer=result; m=1; } } }if(m!=1){ printf("\nCongratulations! You got it!\n"); correct++; m=0; } wait_a_second (); wait_a_second (); if(correct%5==0){ printf("Do you want to do more divisions? (Yes -> 1 / No -> 0)\n"); scanf("%d",&status); } } } } printf("Would you like to do more arithmetic operations? (Yes -> 1 / No -> 0)\n"); scanf("%d",&continu); } while(continu==1); } void wait_a_second () { clock_t second; second = clock () + CLOCKS_PER_SEC ; while (clock() < second); }
评论
    相关推荐
    • edge-ui
      添加了valk edge ui(没有错误修复或任何东西仅仅是化妆品) 符文标记。 堕落之神和仙境传说活跃时重叠 指令 /8 edgeui主命令,如果您关闭了ui,也可用于手动打开ui /8 edgeui scale somenumber更改ui的比例...
    • EDGE modem
      传统2代手机无线,GSM技术,用手机流量上网用的MODEM驱动程序。
    • analytics-edge
      分析边缘
    • 卸载Edge浏览器
      卸载Edge卸载Edge
    • edge_detection
      sobel_gradient_filter 索非亚大学FMI“模式识别”课程“圣克莱门特·奥赫里斯基”项目
    • edge-connector
      边缘连接器是CORS。
    • edge_detection
      edge_detection
    • SUSAN Edge Detector
      The SUSAN Edge Detector in Detail
    • Edge detection
      Edge detection Edge detection Edge detection Edge detection Edge detection
    • 锐联EDGE驱动
      锐联EDGE驱动,T型卡,网卡驱动,上网拨号