福建江夏實(shí)驗(yàn)一.doc_第1頁(yè)
福建江夏實(shí)驗(yàn)一.doc_第2頁(yè)
福建江夏實(shí)驗(yàn)一.doc_第3頁(yè)
全文預(yù)覽已結(jié)束

下載本文檔

版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

實(shí) 驗(yàn) 報(bào) 告課程名稱 計(jì)算機(jī)程序設(shè)計(jì) 實(shí)驗(yàn)名稱 C+集成環(huán)境的使用 系別 電子信息科學(xué)系 專業(yè)班級(jí) 信管(3)班 指導(dǎo)教師 馬航飛 學(xué)號(hào)3110814322 姓名 張 玲 實(shí)驗(yàn)日期 2012.9.11 實(shí)驗(yàn)成績(jī)_一、 實(shí)驗(yàn)?zāi)康?.了解并初步掌握Microsoft Visual C+6.0 集成開(kāi)發(fā)環(huán)境的使用;2. 最簡(jiǎn)單的程序開(kāi)發(fā)3. 掌握C+程序的編寫格式、調(diào)試、運(yùn)行。4. 掌握基本輸入輸出的方法。5. 了解基本數(shù)據(jù)類型的字節(jié)寬二、 實(shí)驗(yàn)環(huán)境1硬件環(huán)境:微機(jī)2軟件環(huán)境:Windows ;Microsoft Visual C+6.0 集成開(kāi)發(fā)環(huán)境。三、實(shí)驗(yàn)內(nèi)容1、實(shí)驗(yàn)題目:設(shè)學(xué)生常數(shù)為500,編程輸出下列結(jié)果(引號(hào)也要輸出)?!癏ow many students here?” “500”(1)基本要求 輸出結(jié)果時(shí),要求輸出雙引號(hào)。(2)實(shí)驗(yàn)代碼#includeint main()coutHow many students here?n; cout500n;(3)請(qǐng)簡(jiǎn)要說(shuō)明程序開(kāi)發(fā)及調(diào)試的步驟1、首先,要將源程序代碼寫出來(lái)2、其次,驗(yàn)證試驗(yàn)代碼是否有錯(cuò)誤3、最后,要是沒(méi)有錯(cuò)誤了,之后就單擊組建調(diào)試,進(jìn)行代碼運(yùn)行。(4)實(shí)驗(yàn)結(jié)果 2、實(shí)驗(yàn)題目:用sizeof( )操作符,求教材表2-2中各數(shù)據(jù)類型的字節(jié)長(zhǎng)度。 (1)基本要求 請(qǐng)按下列格式要求輸出結(jié)果:size of char 1 byte size of int 2byte (2)實(shí)驗(yàn)代碼#include int main() cout size of char sizeof(char) byten size of unsigned char sizeof(unsigned char) byten size of signed char sizeof(signed char) byten size of int sizeof(int) byten size of unsigned sizeof(unsigned) byten size of signed sizeof(signed) byten size of short sizeof(short) byten size of unsigned short sizeof(unsigned short) byten size of long sizeof(long) byten size of signed long sizeof(signed long) byten size of unsigned long sizeof(unsigned long) byten size of float sizeof(float) byten size of double sizeof(double) byten size of long double sizeof(long double) byten;(3)實(shí)驗(yàn)結(jié)果 四、實(shí)驗(yàn)小結(jié)1、實(shí)驗(yàn)出錯(cuò)情況及解決辦法-Configuration: s2_4 - Win32 Debug-Compiling.s2_4.cppg:程序設(shè)計(jì)作業(yè)s2_4.cpp(1) : error C2006: #include expected a filename, found g:程序設(shè)計(jì)作業(yè)s2_4.cpp(1) : error C2006: #include expected a filename, found g:程序設(shè)計(jì)作業(yè)s2_4.cpp(4) : error C2065: cout : undeclared identifierg:程序設(shè)計(jì)作業(yè)s2_4.cpp(4) : error C2297: : illegal, right operand has type char 27g:程序設(shè)計(jì)作業(yè)s2_4.cpp(5) : error C2297: : illegal, right operand has type char 7g:程序設(shè)計(jì)作業(yè)s2_4.cpp(6) : warning C4508: main : function should return a value; void return type assumed執(zhí)行 cl.exe 時(shí)出錯(cuò).s2_4.exe - 1 error(s), 0 warning(s)-Configuration: s2_4 - Win32 Debug-Compiling.s2_4.cppg:程序設(shè)計(jì)作業(yè)s2_4.cpp(1) : fatal error C1083: Cannot open include file: iotream.h: No such file or directory執(zhí)行 cl.exe 時(shí)出錯(cuò).s2_4.exe - 1 error(s), 0 warning(s)-Configuration: s2_4 - Win32 Debug-Compiling.s2_5.cppG:程序設(shè)計(jì)作業(yè)s2_5.cpp(4) : error C2065: har : undeclared identifier執(zhí)行 cl.exe 時(shí)出錯(cuò).-Configuration: s2_4 - Win32 Debug-Compiling.s2_5.cppG:程序設(shè)計(jì)作業(yè)s2_5.cpp(18) : error C2143: syntax error : missing ; before 執(zhí)行 cl.exe 時(shí)出錯(cuò).s2_4.exe - 1 error(s), 0 warning(s)1、第一題將英文中的寫成中文的書名號(hào)“”,之后改正。2、第二個(gè)問(wèn)題是將預(yù)處理文

溫馨提示

  • 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

評(píng)論

0/150

提交評(píng)論