搜索
楼主: 4k-Rn
打印 上一主题 下一主题

终极计算器!!!!!!

[复制链接]
31#
发表于 2013-7-22 17:09:06 | 只看该作者
谢谢楼主分享
32#
发表于 2013-7-22 18:33:27 | 只看该作者
{:soso_e129:}估计不是楼主自己编的
33#
发表于 2013-7-22 18:34:33 | 只看该作者
谢谢分享
34#
发表于 2013-7-27 22:55:31 | 只看该作者
给劲{:soso_e116:}
35#
发表于 2013-7-27 22:55:37 | 只看该作者
给劲{:soso_e116:}
36#
 楼主| 发表于 2013-8-2 12:16:13 | 只看该作者
超神级 发表于 2013-7-22 18:33
估计不是楼主自己编的

原创............
37#
发表于 2013-8-2 14:16:26 | 只看该作者
那么厉害..
38#
发表于 2013-11-2 17:06:50 | 只看该作者
没有源码·········
39#
 楼主| 发表于 2013-11-5 21:56:39 | 只看该作者
4399APPLE 发表于 2013-11-2 17:06
没有源码·········

源码丢了,55555
40#
 楼主| 发表于 2013-11-5 21:57:42 | 只看该作者
]#include <stdio.h>
#include <windows.h>
#include <string.h>
#include <conio.h>
#include <ctype.h>
#include <stdlib.h>
#include <malloc.h>
#include <dos.h>
main()
{
system("title 万能计算器");
system("color 1c");
printf(" \n──────────────────万能计算器────────────────  \n");
printf(" \t┏━━━━━━━━━━━━━━━━━━━━━┓\n");
printf(" \t┃1.科学计算器                              ┃\n");
printf(" \t┃2.八进制计算器                            ┃\n");
printf(" \t┃3.十六进制计算器                          ┃\n");
printf(" \t┃4.二进制计算器                            ┃\n");
printf(" \t┗━━━━━━━━━━━━━━━━━━━━━┛\n\n\n");
printf(" 请输入:");
char A;
A=getch();
{
if(A=='1')
{
system("title 科学计算器");
    while(1)
    {
    system("cls");
    system ("color 1c");
        int a,b,c,d,e,f;
      double i,m,n;
      const double pi=3.141592;
    printf("==========================================\n");
    printf("欢迎使用计算器。\n\n");
    printf("(a是关于三角函数与双曲三角函数,x)输入a:");
    scanf("%d",&a);
    printf("(b是关于反三角函数,对数,e为底指数,y)输入b:");
    scanf("%d",&b);
    printf("输入底数:\t");
    scanf("%d",&c);
    printf("输入指数:\t");
    scanf("%d",&d);
    printf("输入根:\t");
    scanf("%lf",&i);
    e=a+b;
    printf("和是%d\t",e);
    e=a*b;
    printf("积是%d\t",e);
    e=a-b;
    printf("差是%d\t",e);
    n=a/b;
    printf("商是%lf\n",n);
    e = pow(c, d);
    printf("乘方是%d\t\t\t",e);
    printf("二次根是%lf\n",sqrt(i));
    m=sin(a*pi/180);
    printf("sin正弦是%lf\t",m);
    m=sinh(a);
    printf("sinh双曲正弦是%lf\t",m);
    m=cos(a);
    printf("asin反正弦是%lf\t\n",m);
    m=acos(a);
    printf("cos余弦是%lf\t",m);
    m=cosh(a);
    printf("cosh双曲余弦是%lf\t",m);
    m=tan(a);
    printf("acos反余弦是%lf\t\n",m);
    m=atan(a);
    printf("tan正切是%lf\t",m);
    m=tanh(a);
    printf("tanh双曲正切是%lf\t",m);
    m=asin(a);
    printf("atan反正切(主值)是%lf\t",m);
    m = log10(b);
    printf("常用对数为:%lf\t",m);
    m = log(exp(b));
    printf("e为底指数为:%lf\t",m);
    m = hypot(a,b);
    printf("第三条边为:%lf\t",m);
    sleep(1000);
    printf("\n\n\n 请问您要再次使用吗? q.使用 其他键.关闭");
    printf("\n\n 请输入:");
  {
    char p;
    p=getch();
{
if(p=='q' || p=='q')
{

}
else
{
return 0;
}
}
}
}
}
{
if(A=='2')
{

system("title 八进制计算器");
    system ("color 1c");
    int a,b,c,d,e;
    while(1)
    {
    {
        system("cls");
    printf("==========================================\n");
    printf("欢迎使用八进制计算器。\n\n");
    printf("输入a:");
    scanf("%d",&a);
    printf("输入b:");
    scanf("%d",&b);
    printf("输入底数:\n");
    scanf("%d",&c);
    printf("输入指数:\n");
    scanf("%d",&d);
    e=a+b;
    printf("和是%o\n",e);
    e=a*b;
    printf("积是%o\n",e);
    e=a-b;
    printf("差是%o\t((0.xx)都为0)\n",e);
    e=a/b;
    printf("商是%o\n",e);
    e = pow(c, d);
    printf("乘方是%o\n",e);
    sleep(1000);
    printf("\n\n\n 请问您要再次使用吗? q.使用 其他键.关闭");
    printf("\n\n 请输入:");
{   
        char k;
    k=getch();
{
if(k=='q' || k=='q')
{

}
else
{
return 0;
}
}
}
}
}
}
{
if(A=='3')
{

system("title 十六进制计算器");
    system ("color 1c");
    int a,b,c,d,e;
    while(1)
    {
    {
        system("cls");
    printf("==========================================\n");
    printf("欢迎使用十六进制计算器。\n\n");
    printf("输入a:");
    scanf("%d",&a);
    printf("输入b:");
    scanf("%d",&b);
    printf("输入底数:\n");
    scanf("%d",&c);
    printf("输入指数:\n");
    scanf("%d",&d);
    e=a+b;
    printf("和是%x\n",e);
    e=a*b;
    printf("积是%x\n",e);
    e=a-b;
    printf("差是%x\n",e);
    e=a/b;
    printf("商是%x\t((0.xx)都为0)\n",e);
    e = pow(c, d);
    printf("乘方是%x\n",e);
    sleep(1000);
    printf("\n\n\n 请问您要再次使用吗? q.使用 其他键.关闭");
    printf("\n\n 请输入:");
{
        char D;
    D=getch();
{
if(D=='q' || D=='q')
{

}
else
{
return 0;
}
}
}
}
}
}
{
if(A=='4')
{
    system("cls");
int i;
char s[128];
printf("输入一个数:");
scanf("%d",&i);
itoa(i, s, 2);
printf("该数转换为二进制是: %s\n",s);
sleep(10000);
return 0;
}
}
}
}

}
}
41#
 楼主| 发表于 2013-11-5 21:58:14 | 只看该作者
4399APPLE 发表于 2013-11-2 17:06
没有源码·········

早到了。。。。。。。
42#
 楼主| 发表于 2013-11-5 21:58:19 | 只看该作者
4399APPLE 发表于 2013-11-2 17:06
没有源码·········

]#include <stdio.h>
#include <windows.h>
#include <string.h>
#include <conio.h>
#include <ctype.h>
#include <stdlib.h>
#include <malloc.h>
#include <dos.h>
main()
{
system("title 万能计算器");
system("color 1c");
printf(" \n──────────────────万能计算器────────────────  \n");
printf(" \t┏━━━━━━━━━━━━━━━━━━━━━┓\n");
printf(" \t┃1.科学计算器                              ┃\n");
printf(" \t┃2.八进制计算器                            ┃\n");
printf(" \t┃3.十六进制计算器                          ┃\n");
printf(" \t┃4.二进制计算器                            ┃\n");
printf(" \t┗━━━━━━━━━━━━━━━━━━━━━┛\n\n\n");
printf(" 请输入:");
char A;
A=getch();
{
if(A=='1')
{
system("title 科学计算器");
    while(1)
    {
    system("cls");
    system ("color 1c");
        int a,b,c,d,e,f;
      double i,m,n;
      const double pi=3.141592;
    printf("==========================================\n");
    printf("欢迎使用计算器。\n\n");
    printf("(a是关于三角函数与双曲三角函数,x)输入a:");
    scanf("%d",&a);
    printf("(b是关于反三角函数,对数,e为底指数,y)输入b:");
    scanf("%d",&b);
    printf("输入底数:\t");
    scanf("%d",&c);
    printf("输入指数:\t");
    scanf("%d",&d);
    printf("输入根:\t");
    scanf("%lf",&i);
    e=a+b;
    printf("和是%d\t",e);
    e=a*b;
    printf("积是%d\t",e);
    e=a-b;
    printf("差是%d\t",e);
    n=a/b;
    printf("商是%lf\n",n);
    e = pow(c, d);
    printf("乘方是%d\t\t\t",e);
    printf("二次根是%lf\n",sqrt(i));
    m=sin(a*pi/180);
    printf("sin正弦是%lf\t",m);
    m=sinh(a);
    printf("sinh双曲正弦是%lf\t",m);
    m=cos(a);
    printf("asin反正弦是%lf\t\n",m);
    m=acos(a);
    printf("cos余弦是%lf\t",m);
    m=cosh(a);
    printf("cosh双曲余弦是%lf\t",m);
    m=tan(a);
    printf("acos反余弦是%lf\t\n",m);
    m=atan(a);
    printf("tan正切是%lf\t",m);
    m=tanh(a);
    printf("tanh双曲正切是%lf\t",m);
    m=asin(a);
    printf("atan反正切(主值)是%lf\t",m);
    m = log10(b);
    printf("常用对数为:%lf\t",m);
    m = log(exp(b));
    printf("e为底指数为:%lf\t",m);
    m = hypot(a,b);
    printf("第三条边为:%lf\t",m);
    sleep(1000);
    printf("\n\n\n 请问您要再次使用吗? q.使用 其他键.关闭");
    printf("\n\n 请输入:");
  {
    char p;
    p=getch();
{
if(p=='q' || p=='q')
{

}
else
{
return 0;
}
}
}
}
}
{
if(A=='2')
{

system("title 八进制计算器");
    system ("color 1c");
    int a,b,c,d,e;
    while(1)
    {
    {
        system("cls");
    printf("==========================================\n");
    printf("欢迎使用八进制计算器。\n\n");
    printf("输入a:");
    scanf("%d",&a);
    printf("输入b:");
    scanf("%d",&b);
    printf("输入底数:\n");
    scanf("%d",&c);
    printf("输入指数:\n");
    scanf("%d",&d);
    e=a+b;
    printf("和是%o\n",e);
    e=a*b;
    printf("积是%o\n",e);
    e=a-b;
    printf("差是%o\t((0.xx)都为0)\n",e);
    e=a/b;
    printf("商是%o\n",e);
    e = pow(c, d);
    printf("乘方是%o\n",e);
    sleep(1000);
    printf("\n\n\n 请问您要再次使用吗? q.使用 其他键.关闭");
    printf("\n\n 请输入:");
{   
        char k;
    k=getch();
{
if(k=='q' || k=='q')
{

}
else
{
return 0;
}
}
}
}
}
}
{
if(A=='3')
{

system("title 十六进制计算器");
    system ("color 1c");
    int a,b,c,d,e;
    while(1)
    {
    {
        system("cls");
    printf("==========================================\n");
    printf("欢迎使用十六进制计算器。\n\n");
    printf("输入a:");
    scanf("%d",&a);
    printf("输入b:");
    scanf("%d",&b);
    printf("输入底数:\n");
    scanf("%d",&c);
    printf("输入指数:\n");
    scanf("%d",&d);
    e=a+b;
    printf("和是%x\n",e);
    e=a*b;
    printf("积是%x\n",e);
    e=a-b;
    printf("差是%x\n",e);
    e=a/b;
    printf("商是%x\t((0.xx)都为0)\n",e);
    e = pow(c, d);
    printf("乘方是%x\n",e);
    sleep(1000);
    printf("\n\n\n 请问您要再次使用吗? q.使用 其他键.关闭");
    printf("\n\n 请输入:");
{
        char D;
    D=getch();
{
if(D=='q' || D=='q')
{

}
else
{
return 0;
}
}
}
}
}
}
{
if(A=='4')
{
    system("cls");
int i;
char s[128];
printf("输入一个数:");
scanf("%d",&i);
itoa(i, s, 2);
printf("该数转换为二进制是: %s\n",s);
sleep(10000);
return 0;
}
}
}
}

}
}
43#
发表于 2013-11-6 09:15:49 | 只看该作者
4k-Rn 发表于 2013-11-5 21:58
]#include
#include
#include

完全不行。。。。。。你的所有
  1. sleep()
复制代码
开头字母
  1. S
复制代码
都小写了,要换成
  1. Sleep()
复制代码
,还有,许多头文件啊哈C是没有滴。。。。。。
44#
发表于 2013-11-7 13:11:28 | 只看该作者
{:soso_e100:}学习一下
45#
 楼主| 发表于 2013-11-8 20:37:50 | 只看该作者
4399APPLE 发表于 2013-11-6 09:15
完全不行。。。。。。你的所有开头字母都小写了,要换成,还有,许多头文件啊哈C是没有滴。。。。。。

这是在啊哈c1.8时代编的
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

广播台
特别关注
快速回复 返回顶部 返回列表