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語言