原创 斐波那契數列的打印

 #include "iostream.h" main() {   int n;  int a[20]={0},i;  a[0]=1;  a[1]=

原创 關於聽Linux課的感受

今天聽了一節關於linux的講座  說真的什麼都沒聽懂  只有一個網絡協議的七層  是高中的時候學過的   還能懂點  那七層是:物理層   數據鏈

原创 程序找錯

 #include <iostream.h> class Customer { public:   int age; }; void mian() {   Customer obj1,obj2;   cout<<"Enter the fi

原创 C++繼承性和派生類的練習

//創建一個學生類,包括學號和成績,編程輸入和顯示學生信息,建立一個人類,包括姓名,性別,年齡,並作爲學生的基類.  #include "iostream.h" class Person { private:  char name[8];

原创 楊輝三角的輸出

#include "iostream.h" #include "iomanip.h" main() {  int i,j,a[10][10]={0},n;  cout<<"請輸入一個整數,來確定顯示的行數:";  cin>>n;  fo

原创 運算符的重載練習

  /* 讓“+”具有連接字符的功能 */ #include "iostream.h" #include "string.h" class Str

原创 課下作業_框架(書的目錄功能 )

index.html的內容:  <html>  <head>   <title>書目錄作業</title>  </head>         <frameset rows="20%,*">   <frame src="image.htm

原创 字母轉換習題

從鍵盤輸入十個字母,要求將字母" a"換成安母"A",將“A”換成“a”。 #include "iostream.h" void main() {  int i;  char ch[10];     for(i=0;i<=9;i++)  

原创 求一長方體的體積和表面積

1.在同一類裏: //求一長方體的體積和表面積 import java.util.*;             public class Box {  int length; //長  int width; //寬  int heig

原创 課堂小練習(指針問題)

 得用指針輸出二維數組的值 //數組與指針 #include "iostream.h" main() {  int a[3][3]={1,2,3,4

原创 求高手指點"魔方數的輸出'的相關問題

/*輸出"魔方陣"。所謂魔方陣是指這樣的方陣,它的每一 行、每一列和對角線之和均相等。例如,三階魔方陣爲 8 1 6 3 5 7 4 9 2 */ #include "iostream.h" #include "iomanip.h" vo

原创 冒泡法排序

C++中經典的案例:利用冒泡法排序   並顯示每一次交換數據的結果。  #include "iostream.h" void main() {  int i,j,k,x;  int a[10];  cout<<"請輸入10個數:"<<en

原创 第一堂課對html的認識

  Html中文稱爲超文本標記語言,用來寫靜態網頁。在網頁語言設計中,屬於最簡單的網頁開發語言。 Html是由多個標籤組成的。標籤分爲單標籤和雙標籤

原创 strcat 的實現

 //編寫一個函數實現strcat的功能。 #include "iostream.h" char * strcat(char * dest, con

原创 一個簡單的數學問題

題:有一個分數序列:2/1,3/2,5/3,8/5,13/18,21/13,……求出該數列的前20項之和。 程序:  #include "iostream.h" void main() {  int i;  float s=0;  flo