c語言程序設計課程簡介
1. C語言程序設計課程設計!
圖書借閱管理,C語言編程的,只要設計部分的,,m
2. C語言程序設計 (學生選修課程設計)
這是我做的,你看是否滿意?可能有點大,但也沒辦法呀,你的題目也比較大,呵呵!所以,如果滿意,多給我追加點分!
#include "stdio.h"
#include "stdlib.h"
#include "string.h"
typedef struct course
{
char number[15],name[25];
int kind,time,lessontime,practicetime,credit,term;
}type;
FILE *fp1;
void overview(); //瀏覽函數,負責瀏覽整個課程信息
void seek(); //查詢函數,負責查詢課程信息
void choose_course();//選課函數,負責讓用戶選課
void out(type temp);
void input();
int main()
{
int n,i;
if((fp1=fopen("course_information.txt","wb"))==NULL)
{printf("創建文件失敗!\n");exit(0);}
printf("請輸入要存儲的課程數目:\n");
scanf("%d",&n);
printf("開始創建文件,請輸入課程信息:\n\n");
for(i=0;i<n;i++)
{
printf("請輸入第%d門課程的信息:\n",i+1);
input();
printf("\n");
}
printf("如想瀏覽整個課程信息,請輸入1;如想查詢課程信息,請輸入2; 如想進行選課,請輸入3;如想結束選修課系統,請輸入0!\n");
while((scanf("%d",&n))!=EOF)
{
if(n==1)
overview();
if(n==2)
seek();
if(n==3)
choose_course();
if(n==0)
exit(0);
printf("\n\n如想繼續操作,只要按規則輸入你要進行的操作即可!\n規則:如想瀏覽整個課程信息,請輸入1;如想查詢課程信息,請輸入2;如想進行選課,請輸入3!\n");
}
printf("歡迎您使用此程序進行選課,謝謝!\n");
fclose(fp1);
return 0;
}
void input()
{
course c_a;
printf("請輸入課程編碼: ");
scanf("%s",c_a.number);
printf("請輸入課程名: ");
scanf("%s",c_a.name);
printf("請輸入課程性質:限選課,請輸入1;選修課,請輸入2;必修課,請輸入3! ");
scanf("%d",&c_a.name);
printf("請輸入課程總學時: ");
scanf("%d",&c_a.time);
printf("請輸入課程授課時間: ");
scanf("%d",&c_a.lessontime);
printf("請輸入課程實驗或實踐時間: ");
scanf("%d",&c_a.practicetime);
printf("請輸入課程學分: ");
scanf("%d",&c_a.credit);
printf("請輸入課程所在的學期,比如第二學期,就輸入2即可。");
scanf("%d",&c_a.term);
fwrite(&c_a,sizeof(struct course),1,fp1);//將一個結構體元素寫入文件中
}
void out(type temp)
{
printf("課程代碼: %s\n課程名: %s\n",temp.number,temp.name);
printf("課程名: %s\n",temp.name);
if(temp.kind==1)
printf("課程性質: Limited optional course\n");
else if(temp.kind==2)
printf("課程性質: Optional course\n");
else if(temp.kind==3)
printf("課程性質: Required Courses\n");
else
printf("該編碼系統不認識,即無對應的課程性質存在!\n");
printf("課程總學時: %d\n課程授課學時: %d\n實驗或上機學時: %d\n學分: %d\n課程開課學期: %d\n\n",temp.time,temp.lessontime,temp.practicetime,temp.credit,temp.term);
}
void overview()
{
rewind(fp1);
course temp;
printf("整個課程信息如下:\n");
while((fread(&temp,sizeof(type),1,fp1))!=0)
out(temp);
}
void seek()
{
int judge,credit=0,kind=0;
char a='N';
course temp;
printf("如想按學分查詢,請輸入1;如想按課程性質,請輸入2:\n");
scanf("%d",&judge);
rewind(fp1); //將文件指針位置置為開頭
if(judge==1)
{
printf("請輸入要查詢的學分:\n");
scanf("%d",&credit);
while((fread(&temp,sizeof(type),1,fp1))!=0)
if(credit==temp.credit)
out(temp);
}
else if(judge==2)
{
printf("請輸入你要查找課程的性質(限選課,請輸入1;選修課,請輸入2;必修課,請輸入3):");
scanf("%d",&kind);
while((fread(&temp,sizeof(type),1,fp1))!=0)
if(temp.kind==kind)
out(temp);
}
else
printf("不好意思,無此類查詢!\n");
}
void choose_course()
{
rewind(fp1);
course temp;
int judge=1,n=0,time=0,credit=0;
char choose[20][20];
r1: printf("請開始填寫課程編號進行選課:\n");
while(judge==1)
{
printf("請輸入你所選課程的標號: ");
scanf("%s",choose[n]);
n++;
printf("如想繼續選課,請輸入1;如想提交,請輸入0!\n");
scanf("%d",&judge);
}
while((fread(&temp,sizeof(type),1,fp1))!=0)
{
for(int i=0;i<n;i++)
if(strcmp(temp.number,choose[i])==0)
{time=time+temp.time;credit=temp.credit;break;}
}
if(time<270||credit<40)
goto r1;
printf("你所選的課為:\n");
while((fread(&temp,sizeof(type),1,fp1))!=0)
{
for(int i=0;i<n;i++)
if(strcmp(temp.number,choose[i])==0)
{out(temp);break;}
}
}
3. c語言程序設計的內容簡介
本書採用「案例引導,任務驅動」的編寫方式,深入淺出地講解了C程序設計的基本方法;通過「案例展示—歸納總結—模仿練習—自主設計」的學習模式,使讀者循序漸進地掌握C語言的編程方法和思想,提高動手能力。全書案例按照「任務要求—問題分析—程序詳解—歸納總結」順序組織,注重培養讀者先進行演算法描述後進行編程實踐的良好編程習慣,使讀者逐步掌握用計算機解決實際問題的方法。全書敘述嚴謹,實例豐富,內容詳盡、難易適中、重點突出,並將指針等較難理解的知識分解到多章講解,降低了讀者學習的難度。
全書分為8章,主要內容包括C語言基礎知識、演算法、C程序的控制結構、數組與指針、函數、結構體與共用體、文件操作和C語言課程設計。
本書適合作為高等院校計算機專業學生的教材,也可作為自學C語言程序設計的參考用書。
4. c語言程序設計課程是什麼課重要性
這是以前看到的一篇文章,感覺很好。不過裡面很多說都絕版了上網慢慢找吧 程序內員之路——如何學容習C語言並精通C語言 程序員之路——如何學習C語言 學習C語言不是一朝一夕的事情,但也不需要花費十年時間才能精通。如何以最小的代價學習並精通C語言
5. c語言程序設計課程設計
有償代,_(:з」∠)_
6. c語言課程設計的內容簡介
本書適合作為普通高等院校或對程序設計要求較高的高職高專院校C語言課程設計、實訓或實習的指導書,也可作為C語言程序設計綜合性實驗的參考書。
7. c語言程序設計的介紹
《c語言程序設計》是2011年中國鐵道出版社出版的圖書,作者是王建國陳惠明。
8. C語言程序設計課程講什麼內容
C語言程序設計課程是入門級的程序設計課程,針對沒有或很少具有編程經驗的在職人員。課程通過學習C語言編程的基礎語法,對程序設計有一個基本的認識,為後續計算機專業課程以及面向對象程序設計課程的學習打下基礎。 課程主要內容:C語言程序基本結構及相關概念、變數、函數、語句、if條件語句、switch條件語句、for循環語句、while循環語句、數組、指針、字元串、結構體。