冯山C语言3 15,冯山
篇一:馮山英語演講稿
My Contribution to Low-carbon Proposition
Hello, everyone!
My name is Feng Shan .The topic of my presentation is my contribution to low-carbon proposition
After the outstanding Copenhagen Conference, China set a target of cutting the nation’s carbon intensity by 45 percent by 2020, compared with the level of 2005. Since then, low-carbon has become a high-frequency and fashionable word; low-carbon lifestyle has also become a trend among certain groups of people.
However, with the popularity of low-carbon, not everyone understands it. Some think it seems so far away and has nothing to do with them, let done contribution to low-carbon proposition. In fact, low-carbon is integrated into each aspect of people’s daily life. Every one of us can do something to contribute to low-carbon. Here are some tips on what we can do for it.
When we brush our teeth, or wash our hands, don’t leave water running. Besides, we should tighten leaking taps as soon as we see them. Each time we are the last to leave classrooms, we should make sure that the lights have been turned off. Moreover, we had better use efficient light bulbs and other environment friendly products so as to reduce energy consumption. We should make full use of every piece of paper that can be double printed. Maybe we should give up the habit of using disposable chopsticks, a big waste of forest resources. In addition, every student from rural areas can advise your parents never to burn the stalks
of crops, which is able to decrease the emission of greenhouse gas. Please forgive me that I can’t make a list in details.
All in all, everybody has the ability to do something for low-carbon and should take own responsibility. It is not only the matter of a few entrepreneurs, but also of the general workers. It’s your duty, my duty and it’s everyone’s duty.
If everyone save one drop of water, all the country can save thousands of cubic meters, and the whole world?
If everyone save one kilowatt-hour electricity, all the country can save billions of kilowatt-hours, and the whole world?
If everyone save one piece of paper, all the country can save thousands of tons, and the whole world?
Surprised? A great shock!
So long as everyone contributes a little for low-carbon proposition, our country will make much progress. Thus, any small action can have a far-reaching effect.
As is known to us, the earth is warming continously; earthquake is happening frequently; serious diseases are spreading rapidly. Therefore, we have no time to hesitate. It is high time to take steps to defend our common home. We must stay informed, get involved and spread the low-carbon; we must appeal more to join us; we must make our own contributions to low-carbon proposition. Try our best! Let's take actions, at once!
Thank you. Thank you for your listening!
篇二:馮山 數據結構
四川師范大學數學與軟件科學學院
實驗報告
課程名稱:數據結構(C語言版)
實驗一:ADT的類C描述向C程序的轉換實驗(2學時)
實驗目的:
(1) 復習C語言的基本用法;
(2) 學會用類C的語言對算法進行描述的方法,將類C算法轉換成C源程序的方法
和過程;
(3) 抽象數據類型的定義和表示、實現;
(4) 加深對數據的邏輯結構和物理結構之間關系的理解; (5) 初步建立起時間復雜度和空間復雜度的概念。 實驗內容:(類C算法的程序實現)
(1) 輸入一組數據存入數組中,并將數據元素的個數動態地由輸入函數完成。求輸入數據的最大值、最小值,并通過函數參數返回所求結果; 實驗準備:
1) 計算機設備;2) 程序調試環境的準備,如TC環境;3) 實驗內容的算法分析與代碼設計與分析準備。 實驗步驟:
1.安裝TC并設置好環境,如果已安裝好,可以跳過此步; 2.錄入程序代碼并進行調試和算法分析;
對實驗內容(1)的操作步驟:1) 用類C語言描述算法過程;2) 用C語言環境實現該算法。
對實驗內容(2)的操作步驟:1) 完成算法的C實現;2) 分析其時間復雜度和空間復雜度。
3.編寫實驗報告。
實驗結果:// 動態分配數組空間
#include "stdio.h" #include "malloc.h"
int size,i; int *pArray; int *p;
void malloc_size() { pArray=(int *)malloc(size*(sizeof(int))); }
int input_size() { printf("please input the size:\n"); printf("size= "); scanf("%d",&size); return 0; }
int input_data() { printf("please input the value:\n"); for(i=0;i
{printf("pArray[%d]= ",i);scanf("%d",&pArray[i]); } return *pArray; }
int Compare() { int x,y,i; x=y=p[0]; for(i=0;i=p[i]) x=p[i];if(y<=p[i]) y=p[i]; } printf("min= %d\t max=%d\n",x,y); return 0; }
int Output_data() { p=pArray; printf("before ofpaixu :\n"); for(i=0;i
void paixu() { int x=0; int i,j; printf("later of paixu:\n"); for(i=0;i=p[j]) { x=p[i];p[i]=p[j];p[j]=x; }}printf("%d\t",p[i]); } printf("\n"); }
void main()
{ clrscr(); input_size(); malloc_size(); input_data(); Output_data(); Compare(); paixu(); }
實驗結果:
實驗二 線性表及其基本操作實驗(2學時)
實驗目的:
(1) 熟練掌握線性表ADT和相關算法描述、基本程序實現結構; (2) 以線性表的基本操作為基礎實現相應的程序;
(3) 掌握線性表的順序存儲結構和動態存儲結構之區分。
實驗內容:(類C算法的程序實現,任選其一。具體要求參見教學實驗大綱)
(1) 一元多項式運算的C語言程序實現(加法必做,其它選做); (2) 有序表的合并; (3) 集合的并、交、補運算; 實驗準備:
1) 計算機設備;2) 程序調試環境的準備,如TC環境;3) 實驗內容的算法分析與代碼設計與分析準備。 實驗步驟:
1.錄入程序代碼并進行調試和算法分析;
2.編寫實驗報告。 實驗結果:
//線性鏈表
#include "malloc.h" #include "stdio.h" #define M 6
typedef struct node { int data;
struct node *next; }*Sqlist;
void Initlialize(Sqlist &L) { L=(Sqlist)malloc(sizeof(Sqlist)); L->next =NULL; }
int Getlength(Sqlist L) { int i=0; Sqlist p=L->next ; while(p!=NULL) {
i++;p=p->next; }
return i; }
int Getelem(Sqlist L,int i) {
int j=1,e; Sqlist p=L->next; while(j
p=p->next ;j++; }
e=p->data ; printf("第 %d 個元素是:%d\n",i,e); return 1; }
int Locatelem(Sqlist L,int x) {
int i=0; Sqlist p=L->next ; while(p!=NULL&&p->data !=x) {p=p->next ; i++; } if(p==NULL)return 0; else{printf("%d 是第 %d 個元素\n",x,i);
篇三:C語言 四川師范大學 信息與計算科學 馮山實驗四
數學與軟件科學學院 實驗報告
2015 年 5月 23日 課程名稱:C語言程序設計專業:信息與計算科學2014級 6班 實驗編號:實驗四 指導教師:馮山
姓名:楊帆 學號:2014060634 實驗得分
一、實驗目的
(1) 掌握C語言程序設計中邏輯量的表示和運用方法;
(2) 掌握C語言程序設計中條件表達式的值的計算方法及其跟程序執行流程之間的邏輯順序關系;
(3) 掌握C語言中的4中選擇結構語句的執行邏輯及其運用方法。
二、實驗內容
(1)if 語句的實驗。 (2) if else語句實驗。
(3)試用if else if else if ...else實現求4個數中最大者的程并做相應測試。 (4)試用switch語句句型實現以上程序,并做相應測試。 (5)請理清習題5-23的邏輯關系,上機進行驗證。
三、實驗準備
(1) 閱讀并分析第1題中的邏輯關系及其分支測試方法; (2) 分析并編寫2、3、4題(需要繪制流程圖)的程序代碼。
四、實驗步驟和結果及分析
(1)if 語句的實驗。 (a)流程圖如下:
no
(b)增加輸入、輸出功能以補充完整該程序段,使之能夠運行;
運行結果:
(c)分析討論:
1)、用2、 0、 4就可以使程序段中每個處理語句都執行一次;應找nA=2 nB=0或n=2 nB=0 nX>1 的數據進行測試。 2)、用3、0、1和 3、0、2這兩組數據可以使程序段中的每個分支都至少運行一次;為找出各個分支中的邏輯錯誤,應選用nA>1&&nA!=2&&nB=0或者 nA=2||nX>1進行邏輯測試。
(2)if else語句實驗
流程圖如下:
程序代碼和運行結果如下::
注意:比較幾個數的大小有很多方法,其中最常用的有 用?表達式來表示(如a>b? a,b表示如果a>b輸出a否則輸出b)還有就是令一個為最大,以此與最大的比較。
(3)if else if else if ...else語句
程序代碼如下:
運行結果:
注意:if與else的就進匹配。
(4)switch 語句
流程圖如:
《馮山》由:免費論文網互聯網用戶整理提供;
鏈接地址:http://www.csmayi.cn/meiwen/43069.html
轉載請保留,謝謝!
總結
以上是生活随笔為你收集整理的冯山C语言3 15,冯山的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: c语言font6x8,爱字体下载安卓版-
- 下一篇: 在c语言中怎么修改信息,车管所信息变更