『壹』 c语言代码

大体上可以满足你的要求了,个别细节你再自己看看吧,我困的实在不行了。。
DEV C++ 编译通过,运行正常 。

#include <stdio.h>
#include <stdlib.h>
#include <conio.h>

void practisesys(void);
void testsys(void);
int typechoose(void);
int Addition(int,int);
int Subtraction(int,int);
int Multiplication(int,int);
int Division(int,int);

int main(void)
{
int choose;
printf(" =====================================================================\n\n");
printf("\t\t Welcome to the math study system\n\n");
printf(" =====================================================================\n\n");
printf("\t\t[1].practise\t\t\t[2].test\n");
printf("\nPlease choose one option of the two:");
scanf("%d",&choose);
if(choose == 1)
{
practisesys();
system("cls");
}
else if(choose == 2)
{
testsys();
system("cls");
}
else
{
printf("Input a wrong number,exit...\n");
getch();
return 0;
}
system("PAUSE");
return 0;
}

void practisesys(void)
{
int n1,n2,result,type,input,right,wrong;
right = 0;
wrong = 0;
type = typechoose();
system("cls");
do
{
do
{
srand((unsigned)time(NULL));
n1 = rand()%100;
n2 = rand()%100;
}while(n1<n2);
label1:
if(type == 1)
{
result = Addition(n1,n2);
printf("%d + %d =",n1,n2);
}
else if(type == 2)
{
result = Subtraction(n1,n2);
printf("%d - %d =",n1,n2);
}
else if(type == 3)
{
result = Multiplication(n1,n2);
printf("%d * %d =",n1,n2);
}
else if(type == 4)
{
result = Division(n1,n2);
printf("%d / %d =",n1,n2);
}
else if(type == 5)
{
srand((unsigned)time(NULL));
type = rand()%4+1;
goto label1;
}
scanf("%d",&input);
if(input == result)
{
right++;
printf("you are right!\n");
}
else
{
wrong++;
printf("you are wrong!\n");
}
}while(1);
printf("you anwsered the question rightly for %d .\n",right);
printf("you totally anwsered the question for %d .\n",right+wrong);
printf("your answer's exactitude rateaccuracy rate is %d %%.\n",right/(right+wrong)*100);
printf("Welcome to use the program!\n");
getch();
return;
}
void testsys(void)
{
int n1,n2,result,input,i,right,wrong,times,sum;
right = 0;
wrong = 0;
sum = 0;
system("cls");
printf("please input how many times would you like to test:");
scanf("%d",×);
do
{
srand((unsigned)time(NULL));
n1 = rand() % 100;
n2 = rand() % 100;
i = rand() % 4+1;
if(i == 1)
{
result = Addition(n1,n2);
printf("%d + %d =",n1,n2);
}
else if(i == 2)
{
result = Subtraction(n1,n2);
printf("%d - %d =",n1,n2);
}
else if(i == 3)
{
result = Multiplication(n1,n2);
printf("%d * %d =",n1,n2);
}
else if(i == 4)
{
result = Division(n1,n2);
printf("%d / %d =",n1,n2);
}
scanf("%d",&input);
if(input == result)
{
right++;
printf("you are right!\n");
}
else
{
wrong++;
printf("you are wrong!\n");
}
}while(sum++ <= times);
printf("you anwsered the question rightly for %d .\n",right);
printf("you totally anwsered the question for %d .\n",right+wrong);
printf("your answer's exactitude rateaccuracy rate is %d %%.\n",right/(right+wrong)*100);
printf("you get the score of %d",right*10);
printf("Welcome to use the program!\n");
getch();
return;
}

int typechoose(void)
{
int choose,flag;
do
{
system("cls");
flag = 0;
printf("1.Addition arithmetic\n2.Subtraction arithmetic\n3.Multiplication arithmetic\n4.Division arithmetic\n5.Commixture arithmetic\n");
printf("\nplease input a number that you choose:");
scanf("%d",&choose);
if(choose != 1 && choose != 2 && choose != 3 && choose != 4 && choose != 5)
{
flag = 1;
}
}while(flag);
return choose;
}

int Addition(int n1,int n2)
{
return n1+n2;
}

int Subtraction(int n1,int n2)
{
return n1-n2;
}

int Multiplication(int n1,int n2)
{
return n1*n2;
}

int Division(int n1,int n2)
{
return n1/n2;
}

『贰』 C语言,C语言源代码到底是什么意思

现在的教学流程有问题

要是我肯定先拿一个可以正常运行的helloworld来一边改

一边讲解

然后写个猜数字控制台程序

接下来用MFC给他写个界面

让大家知道学习这些算法到底有什么用

再往后,我可能会一直教界面编程

直到你们感觉到自己的算法需要深入学习

然后再回过头去学算法

别用什么垃圾TC了,这都什么年代了

新手建议VC6即可,又可以学算法

也能开发MFC界面程序对电脑配置要求也不搞

甚至绿色精简版就能用

然后写一些游戏相关的工具或者网络相关的工具

不怕不懂,这样至少知道缺什么知识,然后去学

我最讨厌学一大堆,也不知道有什么用的

提不起兴趣,也没有积极主动性

我写的网游服务器在线人数实时显示。。。。

还有游戏辅助没写完 这里不能上图了,要是上那个估计会被删除回答

『叁』 c语言程序代码

这是昨晚一个人找我做的,他给了我一百块钱买我的代码,现在我不要你的钱了,你点赞我我就发代码给你

『肆』 C语言,求完整的源代码

#include<stdio.h>

floatGetFactorialNum(intn)//计算阶乘的函数
{
if((0==n)||(1==n))//默认0和1的阶乘都是1
{
return1;
}

inti;
intfactnum=1;
for(i=2;i<=n;i++)//从2到n逐个乘以
{
factnum*=i;//factnum是i的阶乘
}
return(float)factnum;//转化为浮点返回
}

voidmain()//主函数
{
intm,n;
floatfactm,factn,factmn;//分别是m的阶乘,n的阶乘,(m-n)的阶乘

while(2==scanf("%d,%d",&m,&n))//获取m,n的值,输入格式必须为m,n
{
if((0>m)||(10<m))//如果m不符合0<=m<=10则输出Error
{printf("Error ");continue;}
if((0>n)||(10<n))//如果n不符合0<=n<=10则输出Error
{printf("Error ");continue;}
if(m<n)//如果m比n还小,输出Error
{printf("Error ");continue;}
if((0==n)&&(0==m))//如果m和m都是0,则结束函数
{break;}

factm=GetFactorialNum(m);//获得m的阶乘
factn=GetFactorialNum(n);//获得n的阶乘
factmn=GetFactorialNum((m-n));//获得m-n的阶乘
printf("%f ",(factm/factn/factmn));//打印m!/n!/(m-n)!的结果
}
return;//函数结束,返回
}

『伍』 C语言的源代码是什么意思啊

C语言源代码,就是依据C语言规则所写出的程序代码,常见的存储文件扩展回名为.c文件和.h文件,分别对应答C源文件(source file)和C头文件(header file)。

C语言是一门编程语言,简单点说,就是由人类书写按照一定规范书写的字符,通过一定手段(编译链接)转换后,可以让电脑或者其它电子芯片"读懂",并按照其要求工作的语言。

在所有的编程语言中,C语言是相对古老而原始的,同时也是在同类语言中更接近硬件,最为高效的编程语言。

(5)c语言系统代码扩展阅读:

C语言广泛应用于底层开发。它的设计目标是提供一种能以简易的方式编译、处理低级存储器、产生少量的机器码以及不需要任何运行环境支持便能运行的编程语言。

它能提供了许多低级处理的功能,可以保持着良好跨平台的特性,以一个标准规格写出的C语言程序可在许多电脑平台上进行编译,甚至包含一些嵌入式处理器(单片机或称MCU)以及超级电脑等作业平台。

其编译器主要有Clang、GCC、WIN-TC、SUBLIME、MSVC、Turbo C等。

『陆』 C语言源程序代码是什么

就是源代码啊!通俗来说可以说是实现一个目的的算法过程!
例如运行之后屏幕上出现A。
那么源代码可以使
#include<stdio.h>
void main()
{printf("A");
}
以上代码的作用就是用来输出A这个字符的

『柒』 求简单C语言程序代码!

小游戏2048源码:

#include<stdio.h>

#include<stdlib.h>

#include<conio.h>

#include<time.h>

#include<windows.h>

int jsk( ); //计算空格数

void rsgm( ); //重置游戏

void inkey( ); //按键输入

void left( ); //向左移动

void right( ); //向右移动

void up( ); //向上移动

void down( ); //向下移动

void show( ); //输出界面

void adnum( ); //添加随机数

void yes( ); //游戏是否结束(1是0否)

void gtxy(int x, int y); //控制光标位置的函数

int a[4][4]; //存储16个格子中的数字

int score = 0; //每局得分

int best = 0; //最高得分

int ifnum; //是否需要添加数字(1是0否)

int over; //游戏结束标志(1是0否)

int i,j,k;

int main( )

{ rsgm( ); //重置游戏

inkey( ); //按键输入

return 0;

}

void setColor(unsigned short ForeColor = 7, unsigned short BackGroundColor = 0)

{ HANDLE handle = GetStdHandle(STD_OUTPUT_HANDLE);

SetConsoleTextAttribute(handle, ForeColor + BackGroundColor * 0x10);

} //用于控制字符颜色的函数

void rsgm( ) //重置游戏

{ score = 0; ifnum = 1; over = 0; srand((unsigned)time(0)); //启动随机数发生器

int n = rand( ) % 16; //随机函数产生0-15的数字

for (i = 0; i < 4; i++)

{for (j = 0; j < 4; j++)

{ if (n == 0) { int k = rand( ) % 3; if (k == 0 || k == 1) { a[i][j] = 2; }

else { a[i][j] = 4; } n--; }

else { a[i][j] = 0; n--; }

}

}

adnum( );

system("cls");

CONSOLE_CURSOR_INFO cursor_info={1,0}; //以下两行是隐藏光标的设置

SetConsoleCursorInfo(GetStdHandle(STD_OUTPUT_HANDLE),&cursor_info);

setColor(14, 0); //设置字体淡红色,背景为黑色

printf(" 2048小游戏"); setColor(7, 0); //恢复白字黑底

printf(" ┌──────┬──────┬──────┬──────┐");

printf(" │ │ │ │ │");

printf(" ├──────┼──────┼──────┼──────┤");

printf(" │ │ │ │ │");

printf(" ├──────┼──────┼──────┼──────┤");

printf(" │ │ │ │ │");

printf(" ├──────┼──────┼──────┼──────┤");

printf(" │ │ │ │ │");

printf(" └──────┴──────┴──────┴──────┘");

show( );

}

void show( ) //输出界面

{ for(i=0;i<4;i++)

for(j=0;j<4;j++)

{ gtxy(7*j+9,2*i+4); //gtxy(7*j+9, 2*i+4)是光标到指定位置输出数字

if(a[i][j]==0){printf(" "); setColor(7, 0); printf("│");}

else if(a[i][j]<10){ if (a[i][j] == 2) {setColor(14, 0); }

else if (a[i][j] == 4) {setColor(13, 0); }

else if (a[i][j] == 8) {setColor(12, 0); }

printf(" %d ", a[i][j]); setColor(7, 0); printf("│");

}

else if (a[i][j] < 100){if (a[i][j] == 16) {setColor(12, 0); }

else if (a[i][j] == 32) {setColor(10, 0); }

else if (a[i][j] == 64) {setColor(2, 0); }

printf(" %d ", a[i][j]); setColor(7, 0); printf("│");

}

else if (a[i][j] < 1000) {if (a[i][j] == 128) {setColor(9, 0); }

else if (a[i][j] == 256) {setColor(1, 0); }

else if (a[i][j] == 512) {setColor(13, 0); }

printf(" %d ", a[i][j]); setColor(7, 0); printf("│");

}

else if (a[i][j] < 10000) {if (a[i][j] == 1024) {setColor(5, 0); }

else {setColor(15, 0); }

printf(" %d ", a[i][j]); setColor(7, 0); printf("│");

}

}

if (jsk( ) == 0)

{ yes( ); if (over) { gtxy(9,12); setColor(10, 0);

printf(" 游戏结束!是否继续? [ Y/N ]:"); }

}

}

void inkey( ) //按键输入

{ int key;

while (1)

{ key = getch( );

if (over) { if (key == 89|| key == 121) {rsgm( ); continue; }

else if (key == 78|| key == 110) { return; }

else continue; }

ifnum = 0;

if(key==224)key=getch( );

switch (key)

{ case 75: left( ); break;

case 77: right( ); break;

case 72: up( ); break;

case 80: down( );break;

}

if (score > best) { best = score; }

if (ifnum) { adnum( ); show( ); }

}

}

int jsk( ) //计算空格数

{ int n = 0;

for (i = 0; i < 4; i++)

{ for (j = 0; j < 4; j++) { if ( a[i][j] == 0) {n++;} } }

return n;

}

void left( ) //向左移动

{ for (i = 0; i < 4; i++)

{for (j = 1, k = 0; j < 4; j++)

{ if (a[i][j] > 0)

{ if ( a[i][k] == a[i][j])

{ a[i][k] *= 2; k++;

score = score + 2 * a[i][j];

a[i][j] = 0; ifnum = 1; }

else if ( a[i][k] == 0) { a[i][k] = a[i][j]; a[i][j] = 0; ifnum = 1; }

else { a[i][k + 1] = a[i][j]; if ((k + 1) != j) { a[i][j] = 0; ifnum = 1; }

k++; }

}

}

}

}

void right( ) //向右移动

{for (i = 0; i < 4; i++)

{for (j = 2, k = 3; j >= 0; j--)

{if (a[i][j] > 0)

{ if (a[i][k] == a[i][j])

{a[i][k] *= 2; k--; score = score + 2 * a[i][j]; a[i][j] = 0; ifnum = 1; }

else if ( a[i][k] == 0) {a[i][k] = a[i][j]; a[i][j] = 0; ifnum = 1; }

else { a[i][k - 1] = a[i][j]; if ((k - 1) != j) { a[i][j] = 0; ifnum = 1; } k--; }

}

}

}

}

void up( ) //向上移动

{for (i = 0; i < 4; i++)

{for (j = 1, k = 0; j < 4; j++)

{if (a[j][i] > 0)

{if ( a[k][i] == a[j][i]) { a[k][i] *= 2; k++;score = score + 2 * a[j][i];

a[j][i] = 0; ifnum = 1; }

else if ( a[k][i] == 0) { a[k][i] = a[j][i]; a[j][i] = 0; ifnum = 1; }

else { a[k + 1][i] = a[j][i]; if ((k + 1) != j) { a[j][i] = 0; ifnum = 1; }

k++; }

}

}

}

}

void down( ) //向下移动

{ for (i = 0; i < 4; i++)

{for (j = 2, k = 3; j >= 0; j--)

{if (a[j][i] > 0)

{if (a[k][i] == a[j][i])

{a[k][i] *= 2; k--;score = score + 2 * a[j][i]; a[j][i] = 0; ifnum = 1; }

else if (a[k][i] == 0) {a[k][i] = a[j][i]; a[j][i] = 0; ifnum = 1; }

else {a[k - 1][i] = a[j][i];

if ((k - 1) != j) {a[j][i] = 0; ifnum = 1; } k--; }

}

}

}

}

void adnum( ) //添加随机数

{ srand(time(0)); //启动随机数发生器

int n = rand( ) % jsk( );

for (int i = 0; i < 4; i++)

{for (int j = 0; j < 4; j++)

{ if (a[i][j] == 0) { if (n != 0) { n--; }

else {int k = rand() % 3;

if (k == 0 || k == 1) {a[i][j] = 2; return; }

else {a[i][j] = 4; return; } }

}

}

}

}

void yes( ) //游戏是否结束

{ for (int i = 0; i < 4; i++)

{for (int j = 0; j < 3; j++)

{if (a[i][j] == a[i][j + 1] || a[j][i] == a[j + 1][i]) {over = 0; return; }}

}

over = 1;

}

void gtxy(int x, int y) //控制光标位置的函数

{ COORD coord;

coord.X = x;

coord.Y = y;

SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), coord);

}

『捌』 c语言学生信息管理系统代码

代码如下:

#include<stdio.h>
#include<malloc.h>
#include<stdlib.h>
#include<string.h>
#include<conio.h>
typedef struct examinee //考生信息结构
{ char examno[20]; //准考证号
char name[10]; //姓名
char sex[4]; //性别
short age; //年龄
char examtype[10]; //报考科目
}ElemType;

typedef struct Node //定义链表结点
{
ElemType data; //数据域
struct Node *next; //指针域
}Node,*List,*position;

List make_empty( List L ); //创建一个带头结点的空表
int is_empty( List L ); //测试链表是否是空表
int is_last( position p, List L ); //测试当前位置是否是表尾
position make_node( position p,int n ); //创建结点并输入考生信息
void put_information( position p ); //是否输出该考生信息
void put_name_information( List L ); //输出姓名为xx的考生信息
int put_pos_information( position p ); //输出该地址考生信息
void link_to_tail( List L, position p ); //将结点连接到表尾
int ciculation_make(); //循环创建考生信息
int judge_put_all(); //是否输出所有考生信息
void put_all(List L); //输出所有考生信息。
position find( List L ); //查找第一个姓名为xx的元素并返回位置
position find_previous( List L ); //查找第一个姓名为xx的元素并返回该元素直接前驱的位置
//int judge_delete_val(); //询问是否删除考生数据
int delete_val( List L ); //删除指定考生信息并输出其信息
void menu(List L); //菜单函数
List L;
//position p;

int
main( void )
{
List L = NULL; //定义头结点指针
position p = NULL; //定义表工作指针
L = make_empty( L ); //创建空表
printf(" ★★考生报名管理程序★★ ---------------------------------------- ");
menu(L);
return 0;
}

//创建一个带头结点的空表
List
make_empty( List L)
{
L = ( List ) malloc (sizeof( Node ));
if(NULL == L)
{
printf("内存分配失败");
exit( 1 );
}
L->next = NULL;
//printf("空表创建成功。 ");
return L;
}

//创建结点并输入考生信息
position
make_node( position p ,int n)
{
if(n) //n为1是创建结点并输入,n为0是修改
{
p = ( position ) malloc ( sizeof ( Node ));
p->next = NULL ;
}
printf("请输入考生准考证号:");
gets(p->data.examno);
printf("请输入考生姓名:");
gets(p->data.name);
do
{
printf("请输入考生性别,只能输入“男”或者“女”:");
gets(p->data.sex);
}
while( 0 != strcmp( p->data.sex, "男" ) && 0 != strcmp( p->data.sex, "女" )); //判断性别是否有误
printf("请输入考生年龄:");
scanf("%hd",&p->data.age);
getchar(); //如果把这句删掉,就“无法执行”下面的报考类别
/*下面的do while用来判断报考类别是否输入有误*/
do
{
printf("请输入报考类别,只能输入“数学”或“英语”或者“数据结构”:");
gets(p->data.examtype);
}
while( 0 != strcmp( "英语", p->data.examtype ) && 0 != strcmp( "数学", p->data.examtype ) && 0 != strcmp( "数据结构", p->data.examtype ));
if(n)
{
printf("报名成功 ");
}
else
{
printf("修改成功 ");
}
return p;
}

//前插法;
void
link_to_tail( List L, position p)
{
p->next = L->next;
L->next = p;
}

//查找第一个姓名为xx的元素并返回位置
position
find( List L )
{
position p = L->next;
char name[10];
printf("请输入你要查找的考生姓名:");
gets(name);
while( p != NULL && 0 != strcmp( p->data.name , name))
{
p=p->next;
}
return p;
}

//测试链表是否是空表
int
is_empty( List L )
{
return L->next == NULL;
}

//测试当前位置是否是表尾
int
is_last( position p, List L )
{
return p->next == NULL;
}

//输出姓名为xx的考生信息
void
put_name_information( List L )
{
position p = find(L);
if(p!=NULL)
{
printf("您要查找的考生信息: ");
printf("准考证号:%s 姓名:%s 性别:%s 年龄:%hd 报考科目:%s ",p->data.examno,p->data.name,p->data.sex,p->data.age,p->data.examtype);
}
else
{
printf("没有您要找的学生。 ");
}

}

//循环创建考生信息
int
ciculation_make()
{
int n = 2;
do
{
printf("是否继续创建考生信息?是请输入“1”,不是请输入“0”:");
scanf("%d",&n);
getchar();
}
while( n != 0 && n != 1);
return n;
}

//是否输出考生信息
void
put_information( position p )
{
int n=2;
do
{
printf("是否输出该考生信息?是请输入“1”,不是请输入“0”:");
scanf("%d",&n);
getchar();
}
while( n != 0 && n != 1);
if(n)
{
printf("准考证号:%s 姓名:%s 性别:%s 年龄:%hd 报考科目:%s ",p->data.examno,p->data.name,p->data.sex,p->data.age,p->data.examtype);
}
}


//是否输出所有考生信息
int
judge_put_all()
{
int n = 2;
do
{
printf("是否输出所有考生信息?是请输入“1”,不是请输入“0”:");
scanf("%d",&n);
getchar();
}
while( n != 0 && n != 1);
return n;
}

//输出所有考生信息
void
put_all(List L)
{
if(L->next == NULL)
{
printf("现无考生报名! ");
}
else
{
position p=L->next;
while( p != NULL )
{
printf("准考证号:%s 姓名:%s 性别:%s 年龄:%hd 报考科目:%s ",p->data.examno,p->data.name,p->data.sex,p->data.age,p->data.examtype);
p=p->next;
}
}
//getchar();

}

//询问是否删除考生数据
int
judge_delete_val()
{
int n = 2;

do
{
printf("是否要删除某个考生数据?是请输入“1”,不是输入“0”:");
scanf("%d",&n);
getchar();
}
while( n != 0 && n != 1);
return n;
}

//查找第一个姓名为xx的元素并返回其直接前驱的位置
position
find_previous( List L )
{
position q = L;
position p = L->next;
char name[10];
printf("请输入你要查找的考生姓名:");
gets(name);
while( p != NULL && 0 != strcmp( p->data.name , name))
{
q=p;
p=p->next;
}
if( p != NULL )
{
return q;
}
else
return p;
}

//删除指定考生信息并输出其信息
int
delete_val(List L)
{
int n=2;
position q=NULL;
position p=find_previous( L ); //返回考生信息地址
if( NULL == p )
{
printf("你要删除的考生不存在 ");
return 0;
}
else
{
q = p->next;
p->next = q->next;
printf("删除成功。 删除的考生信息为: ");
printf("准考证号:%s 姓名:%s 性别:%s 年龄:%hd 报考科目:%s ",q->data.examno,q->data.name,q->data.sex,q->data.age,q->data.examtype);
free(q);
return 1;
}

}

//输出该地址考试信息
int
put_pos_information( position p )
{
if(p != NULL )
{
printf("准考证号:%s 姓名:%s 性别:%s 年龄:%hd 报考科目:%s ",p->data.examno,p->data.name,p->data.sex,p->data.age,p->data.examtype);
return 1;
}
else
{
printf("没有您要查找的学生。");
return 0;
}
}
//菜单函数
void
menu(List L)
{
printf(" a. 考生报名入口 ");
printf(" b. 查询考生信息 ");
printf(" c. 修改考生信息 ");
printf(" d. 删除考生信息 ");
printf(" e. 全部考生信息 ");
printf(" f. 程序作者信息 ");
printf(" g. 退出程序 ");
char n='h';

while(n != 'g')
{
do //确定正确输入
{
printf("请通过字母序号选择功能:");
n = getchar();
getchar();
putchar(' ');
if( n < 'a' || n > 'g')
{
printf("错误的字母序号。 ");
}
}
while( n < 'a' || n > 'g' );
switch (n)
{
case 'a':
{
printf("请输入报名考生信息: ");
position p = make_node( p, 1 ); //创建新结点
link_to_tail( L, p ); //将新结点连接到表上
put_information( p ); //是否输出该考生信息
putchar(' ');
}
break;

case 'b':
{
put_name_information( L );
putchar(' ');
}
break;

case 'c':
{
int n=0;
position p = NULL;
printf("您正在进行修改操作。 ");
p = find(L);
n = put_pos_information( p );
if(n)
{
make_node( p , 0 );
put_information( p ); //是否输出该考生信息
}
putchar(' ');
}
break;

case 'd':
{
printf("您正在进行删除操作。 ");
delete_val( L );
putchar(' ');
}
break;

case 'e':
{
put_all( L );
putchar(' ');
}
break;

case 'f':
{
printf(" 修改日期 版本号 修改人 修改内容 ");
printf(" -------------------------------------------------------- ");
printf(" 2018.6.19 v2.0 陈百川 增加主菜单 ");
printf(" 2018.6.23 v3.0 陈百川 增加生成文件功能 ");
printf(" 该版本号为v2.0 ");
putchar(' ');
}
break;

default:
break;
}
}
printf(" 感谢本次使用,祝您生活愉快。");
getch();
}

(8)c语言系统代码扩展阅读:

C语言是一门通用计算机编程语言,广泛应用于底层开发。C语言的设计目标是提供一种能以简易的方式编译、处理低级存储器、产生少量的机器码以及不需要任何运行环境支持便能运行的编程语言。

尽管C语言提供了许多低级处理的功能,但仍然保持着良好跨平台的特性,以一个标准规格写出的C语言程序可在许多电脑平台上进行编译,甚至包含一些嵌入式处理器(单片机或称MCU)以及超级电脑等作业平台。

二十世纪八十年代,为了避免各开发厂商用的C语言语法产生差异,由美国国家标准局为C语言制定了一套完整的美国国家标准语法,称为ANSI C,作为C语言最初的标准。[1]目前2011年12月8日,国际标准化组织(ISO)和国际电工委员会(IEC)发布的C11标准是C语言的第三个官方标准,也是C语言的最新标准,该标准更好的支持了汉字函数名和汉字标识符,一定程度上实现了汉字编程。

C语言是一门面向过程的计算机编程语言,与C++,Java等面向对象的编程语言有所不同。

其编译器主要有Clang、GCC、WIN-TC、SUBLIME、MSVC、Turbo C等。

参考资料:

网络——C语言