斯坦计算器电脑版4.0版本升级至8.1.0版本!

4634 1
鹰眼(流星) 2022-4-16 21:43:37 | 显示全部楼层 |阅读模式
Hello, 各位同胞,经过我长期的规划,按计划升级的"斯坦计算器电脑版.8.1.0"也正式完成了!

至于为什么版本跳跃这么大,主要是因为里面的内容有大幅改动,比上一个版本的行数增加了两倍左右,并且新增了一个功能,大家可以将这个与上一个做对比,运行一下,程序代码如下:

#include <stdio.h>
#include <stdlib.h>
int xxx = 1;
int vvv = 0;

double aa1 = 0;
double aa2 = 0;


void GM()//标签
{
        system("cls");
    printf("============================================================================================================================================================================================================================================\n");
    printf("\t\t\t\t\t\t\t\t\t\t\t\t\t       Stein calculator\n");
    printf("============================================================================================================================================================================================================================================\n");
    printf("\n\n");
}
void GM1()//标签
{
        system("cls");
    printf(">>Operations of addition and subtraction and multiplication and division-----------------------------------\n");
    printf("\n\n");
}
void GM2()//标签
{
        system("cls");
    printf(">>Wheel calculation(+--+)----------------------------------------------------------------------------------\n");
    printf("\n\n");
}
void NNO()//错误判断
{
        GM1();
    printf("SIGN INPUT ERROR!\n");
}
void AA1()//有余数的除法
{
        int n = 0;
    int b = 0;
    printf("Please enter the dividend:\n");
    scanf("%d", &n);
    printf("Please enter the divisor:\n");
    scanf("%d", &b);
    printf("%d / %d = %d     %d\n", n, b, n / b, n % b);
}
void AA2()//没有余数的除法
{
        printf("Please enter the dividend:\n");
    scanf("%lf", &aa1);
    printf("Please enter the divisor:\n");
    scanf("%lf", &aa2);
    printf("%f / %f = %f\n", aa1, aa2, aa1 / aa2);
}
void AA3()//加法
{
        printf("Please enter an addition1:\n");
    scanf("%lf", &aa1);
    printf("Please enter an addition2:\n");
    scanf("%lf", &aa2);
    printf("%f + %f = %f\n", aa1, aa2, aa1 + aa2);
}
void AA4()//减法
{
        printf("Please enter the minus number1:\n");
    scanf("%d", &aa1);
    printf("Enter the minus number2:\n");
    scanf("%d", &aa2);
    printf("%f - %f = %f\n", aa1, aa2, aa1 - aa2);
}
void AA5()//乘法
{
        printf("Please enter the multiplier1:\n");
    scanf("%lf", &aa1);
    printf("Please enter the multiplier2:\n");
    scanf("%lf", &aa2);
    printf("%f * %f = %f\n", aa1, aa2, aa1 * aa2);
}
void AA6()//除法集体
{
    int yu;
        printf("Is there a remainder?(There are 1, but only the total number of support!):\n");
    scanf("%d", &yu);
    GM1();
    if(yu == 1)
    {
        AA1();
    }
    else
    {
        AA2();
    }
}
void AAX1()//开始运算
{
    int h;
        GM1();
    printf("Please enter mode?\naddition=1\nsubtraction=2\nmultiplication=3\ndivision=4\n");
    scanf("%d", &h);
    GM1();

    if(h == 1)
    {
        AA3();
    }
    else if(h == 2)
    {
        AA4();
    }
    else if(h == 3)
    {
        AA5();
    }
    else if(h == 4)
    {
        AA6();
    }
    else
    {
        NNO();
    }
}
void AB1()//计算后齿轮齿数
{
    GM2();
    double nn, xx;
    printf("Please enter a number (front gear) :");
    scanf("%lf", &nn);
    printf("Please enter a number (after the number of rotation of the gears) :");
    scanf("%lf", &xx);
    double nx = nn / xx;
    printf("The number of teeth in the rear gear is:%lf\n", nx);
}
void AB2()//计算前齿轮齿数
{
    GM2();
    double nn, xx;
    printf("Please enter a number (rear gear) :");
    scanf("%lf", &nn);
    printf("Please enter a number (after the number of rotation of the gears) :");
    scanf("%lf", &xx);
    double nx = nn * xx;
    printf("The number of teeth of the front gear is:%lf\n", nx);
}
void AB3()//计算前齿轮轮数
{
    GM2();
    double nn, xx;
    printf("Please enter a number (rear gear) :");
    scanf("%lf", &nn);
    printf("Please Please enter a number (front gear) :");
    scanf("%lf", &xx);
    double nx = nn / xx;
    printf("The number of wheels of the front gear is:%lf\n", nx);
}
void AB4()//计算后齿轮轮数
{
    GM2();
    double nn, xx;
    printf("Please enter a number (front gear) :");
    scanf("%lf", &nn);
    printf("Please enter a number (rear gear) :");
    scanf("%lf", &xx);
    double nx = nn / xx;
    printf("The number of wheels of the rear gear is:%lf\n", nx);
}
void ABX1()//开始运算
{
    int h;
        GM2();
    printf("Please enter mode?\n1. Number of teeth of rear gear \n2. Number of teeth of front gear \n3. Number of weeks of rotation of front gear \n4. Number of weeks of rotation of rear gear\n");
    scanf("%d", &h);
    GM2();

    if(h == 1)
    {
        AB1();
    }
    else if(h == 2)
    {
        AB2();
    }
    else if(h == 3)
    {
        AB3();
    }
    else if(h == 4)
    {
        AB4();
    }
    else
    {
        NNO();
    }
}
void VVV()//目录
{
        GM();
    printf("\t\t\t\t\t\t\t\t\t\t\t\t\t      /Table of contents/\n");
    printf("1.Operations of addition and subtraction and multiplication and division\n");
    printf("2.Wheel calculation(+--+)\n");
        printf("\n\n\n\n\n\n\n\n\nPlease enter mode?\n");
    scanf("%d", &vvv);
    if(vvv == 1)
        AAX1();
    else if(vvv == 2)
        ABX1();
    else
        NNO();
}
void XXX()//退出运算流程
{
    printf("Whether to continue (exit: 1):\n");
    scanf("%d", &xxx);
    GM();

    if(xxx == 1)
    xxx = 0;
    else
    xxx = 1;
}
int main(void)
{
    while(xxx == 1)
    {
        VVV();
        //进入运算流程
        XXX();
                //退出运算流程
    }
    printf("Bay-bay");
        return 0;//退出程序
}

如上就是本程序的代码,顺便问一下使用Windous的媒体库中的声音播放的函数时,目标文件应该放在哪里才能被检测到?
来自圈子: 中国红客技术交流圈
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

中国红客联盟公众号

联系站长QQ:5520533

admin@chnhonker.com
Copyright © 2001-2026 Discuz Team. Powered by Discuz! X3.5 ( 粤ICP备13060014号 )|天天打卡 本站已运行