搜索资源列表
houzhuishi2
- \"栈顶运算符为: %c\\n\",getTop(optr)) printf(\"此时运算符为:%c\\n\",e) printf(\"栈顶运算符优先级低,%c进栈\\n\",e) push(optr,e) //e进运算符栈
c
- c++冒泡排序#include \"stdio.h\" void sort() { int i,count=0,a[20] int k=20 printf(\"please input 20 defferent numbers?\\n\") for(i=0 i<20 i++) scanf(\" %d\\a\",&a[i]) while(count<20) { for(i=0 i<k i++)
约瑟夫
- #include void main() { int i,j,k,a[31],n=0; for(i=0;i<=30;i++) a[i]=0; k=1; for(i=1;i30) k=1; } a[k++]=1; if(k>30) k=1; //n++; } printf("%d\n",k); for(i=1;i<=30;i++) printf("%d ",a[i])
白噪声随机数的产生
- #include<stdio.h> #include<stdlib.h> #include<math.h> #define E 6 #define D 1 double N() { double n=0;int i; for(i=0;i<12;i++) n+=(double)rand()/RAND_MAX; n=(n-E)/sqrt(D); return n; } void main() {
tony
- 溫度華氏轉變攝氏 #include <stdio.h> #include <stdlib.h> enum x {A,B,C,D,E} int main(void) { int a=73,b=85,c=66 { if (a>=90) printf("a=A等級!!\n") else if (a>=80) printf("73分=B等級!!\n") else if (a>=70)
tony
- 溫度華氏轉變攝氏 #include <stdio.h> #include <stdlib.h> enum x {A,B,C,D,E} int main(void) { int a=73,b=85,c=66 { if (a>=90) printf("a=A等級!!\n") else if (a>=80) printf("73分=B等級!!\n") else if (a>=70)
tony
- 成績顯示三個部份abc #include<stdio.h> #include<stdlib.h> int main(void) { float gread printf("請輸入分數\n") scanf("%f",&gread) if(gread>=80&&gread<=100) printf("成績為A\n") else if(gread>=60&&gread<=79) {
tony
- 河內塔問題 #include<stdio.h> #include<stdlib.h> int fun_a(int) void fun_b(int,int,int,int) int main(void) { int n int option printf("題目二:河內塔問題\n") printf("請輸入要搬移的圓盤數目\n") scanf("%d",&n) printf("最少搬移的次數為%d
tony
- 指定一個數字轉換回十進位,八進位,十六進位#include <stdio.h> #include <stdlib.h> int main(void) { int number =89 printf("數字 %d\n",number) /* %d 為十進位輸出格式*/ printf("八進位為 %o\n",number) /* %o 為八進位輸出格式*/ printf("十六進位為%x\n",number) /* %x 為
qishi
- void Knight(int i , int j) { // printf("%d %dn",i,j) if (board[i][j] != 0 || i < 0 || i >= Size || j < 0 || j >= Size ) { return } step++ board[i][j]=step if (step == Size*Size) { showboard() system("PAUSE
pr1
- #include<stdio.h> void main(void) {int n,k,derivata,a[10],i printf("n=") scanf(" d",&n) for(i=0 i<=n i++) { printf("a[ d]=",i) scanf(" d",&a[i]) } printf("k=") scanf(" d",&k) for(derivata=1 derivata<=k derivata++
puke
- 编号为1-52张牌,正面向上,从第2张开始,以2为基数,是2的倍数的牌翻一次,直到最后一张牌;然后,从第3张开始,以3为基数,是3的倍数的牌翻一次,直到最后一张牌;然后…从第4张开始,以4为基数,是4的倍数的牌翻一次, 直到最后一张牌;...再依次5的倍数的牌翻一次,6的,7的 直到 以52为基数的 翻过,输出:这时正面向上的牌有哪些?-#include "stdio.h" void main() {/*采用数组存储,循环嵌套实现*/ int i,j in
student_score
- 学生成绩管理,实现按姓名、学号查询,以及增加、删除、修改学生成绩,显示不同分数段的学生成绩和按总成绩排序结果并输出成绩等功能。 printf("| 10 按学号排序结果并输出成绩-Student performance management, to achieve, by name, student number query, as well as add, delete, modify student achievement, indicating a different segment
Data_struct_1
- 数据结构课后设计题第一章 ◆1.16② 试写一算法,如果三个整数X,Y和Z 的值不是依次非递增的,则通过交换,令其为 非递增。 要求实现下列函数: void Descend(int &x, int &y, int &z) void Descend(int &x, int &y, int &z) { int temp if(x<=y){temp=x x=y y=temp } if(y<=z){temp=y y=z z
Huffmantree
- 赫夫曼树: 按先序输入二叉树 数的结点是: 输入赫夫曼树的mm个权值: HuffmanCoding(HT,HC,&HT[mm].weight,mm) printf(HC,mm) -Huffman tree: sequence input by the first node is a binary number: Enter a Huffman tree mm Weight: HuffmanCoding (HT, HC, & HT [mm]. Weight, mm)
gaosi
- 高斯列主元消去法 #include<stdio.h> #include<conio.h> #include<math.h> #define N 100 float a[N][N+1] void main( ) { int i,j,k,n float t,s=0, clrscr( ) printf("输入矩阵阶数:") scanf(" d",&
choice-of-radio-freq
- C,C++ Questions 1. Base class has some virtual method and derived class has a method with the same name. If we initialize the base class pointer with derived object,. calling of that virtual method will result in which method being called? a.
Virtual-router
- C,C++ Questions 1. Base class has some virtual method and derived class has a method with the same name. If we initialize the base class pointer with derived object,. calling of that virtual method will result in which method being called? a.
Index
- C,C++ Questions 1. Base class has some virtual method and derived class has a method with the same name. If we initialize the base class pointer with derived object,. calling of that virtual method will result in which method being called? a.
3-LOCPOT
- 可以处理三维矩阵数据,三维数组的线性化处理,-#include<stdio.h> #define N 56 #define M 56 #define L 336 #define Leng 23.693 double V[N][M][L] void main() { int i, j, k double Z[L], ZL[L], S, A FILE*fp1,*fp2 if ((fp1 = fopen("LO