亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

蟲蟲首頁| 資源下載| 資源專輯| 精品軟件
登錄| 注冊

Beg<b>IN</b>n<b>IN</b>g

  • 編寫具有如下函數原型的遞歸與非遞歸兩種函數equ

    編寫具有如下函數原型的遞歸與非遞歸兩種函數equ,負責判斷數組a與b的前n個元素值是否按下標對應完全相同,是則返回true,否則返回false。并編制主函數對它們進行調用,以驗證其正確性。 bool equ(int a[], int b[], int n) 提示:遞歸函數中可按如下方式來分解并處理問題,先判斷最后一個元素是否相同,不同則返false;相同則看n是否等于1,是則返回true,否則進行遞歸調用(傳去實參a、b與 n-1,去判斷前n-1個元素的相等性),并返回遞歸調用的結果(與前n-1個元素的是否相等性相同)。

    標簽: equ 函數 遞歸 編寫

    上傳時間: 2014-01-18

    上傳用戶:love1314

  • 漢諾塔!!! Simulate the movement of the Towers of Hanoi puzzle Bonus is possible for using animation

    漢諾塔!!! Simulate the movement of the Towers of Hanoi puzzle Bonus is possible for using animation eg. if n = 2 A→B A→C B→C if n = 3 A→C A→B C→B A→C B→A B→C A→C

    標簽: the animation Simulate movement

    上傳時間: 2017-02-11

    上傳用戶:waizhang

  • this program is counting_sort that writted with c++. this program get an array and sort it in order

    this program is counting_sort that writted with c++. this program get an array and sort it in order n.

    標簽: program this counting_sort writted

    上傳時間: 2017-03-23

    上傳用戶:小草123

  • this program is stooge_sort that writted with c++. this program get an array and sort it in order n

    this program is stooge_sort that writted with c++. this program get an array and sort it in order nlogn.

    標簽: program this stooge_sort writted

    上傳時間: 2013-11-28

    上傳用戶:1051290259

  • this program is insertion_sort that writted with c++. this program get an array and sort it in orde

    this program is insertion_sort that writted with c++. this program get an array and sort it in order n^2.

    標簽: program this insertion_sort writted

    上傳時間: 2014-11-09

    上傳用戶:rocketrevenge

  • 學生管理啊

    #include <iostream.h> #include <string.h> #include <iomanip.h> #include "Stud.h" Stud::Stud(){} char *Stud::getno()              //獲取學號 { return no; } char *Stud::getname()            //獲取姓名 { return name; } char *Stud::getsex()             //獲取性別 { return sex; } char *Stud::getminzu()           //獲取民族 { return minzu; } char *Stud::getaddress()         //獲取出生地 { return address; } char *Stud::getbirth()           //獲取出生年月 { return birth; } int Stud::gettag()               //獲取姓名 { return tag; } void Stud::changeno(char n[])                 //設置學號 { strcpy(no,n); } void Stud::changename(char na[])              //設置姓名 { strcpy(name,na); } void Stud::changesex(char s[])                //設置性別 { strcpy(sex,s); } void Stud::changeminzu(char m[])               //設置民族 { strcpy(minzu,m); } void Stud::changeaddress(char a[])             //設置出生地 { strcpy(address,a); } void Stud::changebirth(char b[])               //設置出生年月 { strcpy(birth,b); } void Stud::addstudent(char *rn,char *rna)      //增加學生 {     strcpy(no,rn); strcpy(name,rna); } void Stud::addstudent(char *rn,char *rna,char *rs,char *rm,char *ra,char *rb)    //增加學生 { tag=0; strcpy(no,rn); strcpy(name,rna); strcpy(sex,rs); strcpy(minzu,rm); strcpy(address,ra); strcpy(birth,rb); } void Stud::delstud()                         //設置刪除標記 { tag=1; } void Stud::disp()                            //輸出學生信息 { cout<<setw(15)<<no<<setw(10)<<name<<setw(10)<<sex<<setw(10)<<minzu<<setw(10)<<address<<setw(10)<<birth<<endl; } void Stud::display()                         //輸出學生信息 {     cout<<setw(15)<<no<<setw(10)<<name; }

    標簽: 學生

    上傳時間: 2016-12-29

    上傳用戶:767483511

  • 道理特分解法

    #include "iostream" using namespace std; class Matrix { private: double** A; //矩陣A double *b; //向量b public: int size; Matrix(int ); ~Matrix(); friend double* Dooli(Matrix& ); void Input(); void Disp(); }; Matrix::Matrix(int x) { size=x; //為向量b分配空間并初始化為0 b=new double [x]; for(int j=0;j<x;j++) b[j]=0; //為向量A分配空間并初始化為0 A=new double* [x]; for(int i=0;i<x;i++) A[i]=new double [x]; for(int m=0;m<x;m++) for(int n=0;n<x;n++) A[m][n]=0; } Matrix::~Matrix() { cout<<"正在析構中~~~~"<<endl; delete b; for(int i=0;i<size;i++) delete A[i]; delete A; } void Matrix::Disp() { for(int i=0;i<size;i++) { for(int j=0;j<size;j++) cout<<A[i][j]<<" "; cout<<endl; } } void Matrix::Input() { cout<<"請輸入A:"<<endl; for(int i=0;i<size;i++) for(int j=0;j<size;j++){ cout<<"第"<<i+1<<"行"<<"第"<<j+1<<"列:"<<endl; cin>>A[i][j]; } cout<<"請輸入b:"<<endl; for(int j=0;j<size;j++){ cout<<"第"<<j+1<<"個:"<<endl; cin>>b[j]; } } double* Dooli(Matrix& A) { double *Xn=new double [A.size]; Matrix L(A.size),U(A.size); //分別求得U,L的第一行與第一列 for(int i=0;i<A.size;i++) U.A[0][i]=A.A[0][i]; for(int j=1;j<A.size;j++) L.A[j][0]=A.A[j][0]/U.A[0][0]; //分別求得U,L的第r行,第r列 double temp1=0,temp2=0; for(int r=1;r<A.size;r++){ //U for(int i=r;i<A.size;i++){ for(int k=0;k<r-1;k++) temp1=temp1+L.A[r][k]*U.A[k][i]; U.A[r][i]=A.A[r][i]-temp1; } //L for(int i=r+1;i<A.size;i++){ for(int k=0;k<r-1;k++) temp2=temp2+L.A[i][k]*U.A[k][r]; L.A[i][r]=(A.A[i][r]-temp2)/U.A[r][r]; } } cout<<"計算U得:"<<endl; U.Disp(); cout<<"計算L的:"<<endl; L.Disp(); double *Y=new double [A.size]; Y[0]=A.b[0]; for(int i=1;i<A.size;i++ ){ double temp3=0; for(int k=0;k<i-1;k++) temp3=temp3+L.A[i][k]*Y[k]; Y[i]=A.b[i]-temp3; } Xn[A.size-1]=Y[A.size-1]/U.A[A.size-1][A.size-1]; for(int i=A.size-1;i>=0;i--){ double temp4=0; for(int k=i+1;k<A.size;k++) temp4=temp4+U.A[i][k]*Xn[k]; Xn[i]=(Y[i]-temp4)/U.A[i][i]; } return Xn; } int main() { Matrix B(4); B.Input(); double *X; X=Dooli(B); cout<<"~~~~解得:"<<endl; for(int i=0;i<B.size;i++) cout<<"X["<<i<<"]:"<<X[i]<<" "; cout<<endl<<"呵呵呵呵呵"; return 0; } 

    標簽: 道理特分解法

    上傳時間: 2018-05-20

    上傳用戶:Aa123456789

  • 學生成績管理

    #include<stdio.h> #include<windows.h> int xuanxiang; int studentcount; int banjihao[100]; int xueqihao[100][10]; char xm[100][100]; int xuehao[100][10]; int score[100][3]; int yuwen; int shuxue[000]; int yingyu[100]; int c[100]; int p; char x[1000][100]="",y[100][100]="";/*x學院 y專業 z班級*/  int z[100];  main() { void input(); void inputsc(); void alter(); void scbybannji(); printf("--------學生成績管理-----\n"); printf("請按相應數字鍵來實現相應功能\n"); printf("1.錄入學生信息   2.錄入學生成績       3.修改學生成績\n"); printf("4.查詢學生成績   5.不及格科目及名單   6.按班級輸出學生成績單\n"); printf("請輸入你要實現的功能所對應的數字:"); scanf("%d",&xuanxiang); system("cls"); getchar(); switch (xuanxiang) { case 1:input(); case 2:inputsc(); case 3:alter(); /*case 4:select score(); case 5:bujigekemujimingdan();*/ case 6:scbybanji; } } void input() { int i; printf("請輸入你的學院名稱:"); gets(x); printf("請輸入你的專業名稱:"); gets(y); printf("請輸入你的班級號:"); scanf("%d",&z); printf("請輸入你們一個班有幾個人:"); scanf("%d",&p); system("cls"); for(i=0;i<p;i++) { printf("請輸入第%d個學生的學號:",i+1); scanf("%d",xuehao[i]); getchar(); printf("請輸入第%d個學生的姓名:",i+1); gets(xm[i]); system("cls"); } printf("您已經錄入完畢您的班級所有學生的信息!\n"); printf("您的班級為%s%s%s\n",x,y,z); /*alter(p);*/ } void inputsc() { int i; for(i=0;i<p;i++) { printf("\n"); printf("--------------------------------------------------------------------------------\n\n"); printf("\t\t\t\t錄入學生的成績\n\n\n"); printf("--------------------------------------------------------------------------------\n\n"); printf("\t\t\t\t%s\n",xm[i]); printf("\n"); printf("\t\t\t\t數學:"); scanf("%d",&shuxue[i]); printf("\n"); getchar(); printf("\t\t\t\t英語:"); scanf("%d",&yingyu[i]); printf("\n"); getchar(); printf("\t\t\t\tc語言:"); scanf("%d",&c[i]); system("cls"); } } void alter() { int i;/*循環變量*/ int m[10000];/*要查詢的學號*/ int b;/*修改后的成績*/ char kemu[20]=""; printf("請輸入你要修改的學生的學號"); scanf("%d",&m); for (i=0;i<p;i++) { if (m==xuehao[i]) { printf("%s的數學成績為%d,英語成績為%d,c語言成績為%d,xm[i],shuxue[i],yingyu[i],c[i]");  printf("請輸入你想修改的科目");} } gets(kemu); getchar(); if (kemu=="數學"); { scanf("%d",&b); shuxue[i]=b;} if (kemu=="英語"); { scanf("%d",&b); yingyu[i]=b;} if (kemu=="c語言"); { scanf("%d",&b); c[i]=b; } printf("%s的數學成績為%d,英語成績為%d,c語言成績為%d,xm[i],shuxue[i],yingyu[i],c[i]"); } void scbybannji() { int i; char zyname[20]; int bjnumber; printf("請輸入你的專業名稱"); scanf("%s",&zyname); printf("請輸入你的班級號"); scanf("%d",&bjnumber); for (i=0;i<p;i++) { if (zyname==y[i]); if (bjnumber==z[i]); printf("專業名稱%s班級號%d數學成績%d英語成績%dc語言成績%d,y[i],z[i],shuxue[i],yingyu[i],c[i]"); } }

    標簽: c語言

    上傳時間: 2018-06-08

    上傳用戶:2369043090

  • Artificial+Intelligence+in+Power+System

    n recent years, there have been many books published on power system optimization. Most of these books do not cover applications of artifi cial intelligence based methods. Moreover, with the recent increase of artifi cial intelligence applications in various fi elds, it is becoming a new trend in solving optimization problems in engineering in general due to its advantages of being simple and effi cient in tackling complex problems. For this reason, the application of artifi cial intelligence in power systems has attracted the interest of many researchers around the world during the last two decades. This book is a result of our effort to provide information on the latest applications of artifi cial intelligence to optimization problems in power systems before and after deregulation.

    標簽: Intelligence Artificial System Power in

    上傳時間: 2020-06-10

    上傳用戶:shancjb

  • 復活節計算器

    復活節計算 int y, n, a, q, b, m, w, d, mm = 4; y = atoi(argv[1]); n = y-1900;  a = fmod(n,19); 

    標簽: 計算器 C語言

    上傳時間: 2021-07-09

    上傳用戶:scfan2004

主站蜘蛛池模板: 肥西县| 图片| 本溪| 北海市| 晋中市| 南投县| 福贡县| 龙南县| 尼玛县| 林周县| 南川市| 越西县| 望谟县| 芦山县| 大姚县| 武胜县| 延边| 晋中市| 平阴县| 莱西市| 嘉义县| 醴陵市| 武陟县| 闻喜县| 兰西县| 丹江口市| 汤原县| 江陵县| 新巴尔虎右旗| 舟山市| 德昌县| 宁津县| 靖安县| 乾安县| 简阳市| 林西县| 游戏| 镇宁| 米脂县| 鸡西市| 根河市|