溫度華氏轉變攝氏 #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) printf("73分=C等級!!\n") else if (a>=60) printf("73分=D等級!!\n") else if (a<60) printf("73分=E等級!!\n") } { if (b>=90) printf("b=A等級!!\n") else if (b>=80) printf("85分=B等級!!\n") else if (b>=70) printf("85分=C等級!!\n") else if (b>=60) printf("85分=D等級!!\n") else if (b<60) printf("85分=E等級!!\n") } { if (c>=90) printf("c=A等級!!\n") else if (c>=80) printf("66分=B等級!!\n") else if (c>=70) printf("66分=C等級!!\n") else if (c>=60) printf("66分=D等級!!\n") else if (c<60) printf("66分=E等級!!\n") } system("pause") return 0 }
上传时间: 2014-11-10
上传用户:wpwpwlxwlx
溫度華氏轉變攝氏 #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) printf("73分=C等級!!\n") else if (a>=60) printf("73分=D等級!!\n") else if (a<60) printf("73分=E等級!!\n") } { if (b>=90) printf("b=A等級!!\n") else if (b>=80) printf("85分=B等級!!\n") else if (b>=70) printf("85分=C等級!!\n") else if (b>=60) printf("85分=D等級!!\n") else if (b<60) printf("85分=E等級!!\n") } { if (c>=90) printf("c=A等級!!\n") else if (c>=80) printf("66分=B等級!!\n") else if (c>=70) printf("66分=C等級!!\n") else if (c>=60) printf("66分=D等級!!\n") else if (c<60) printf("66分=E等級!!\n") } system("pause") return 0 }
上传时间: 2013-12-12
上传用户:亚亚娟娟123
成績顯示三個部份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) { printf("成績為B\n") } else if(gread>=0&&gread<60) { printf("成績為C\n") } else { printf("分數輸入錯誤\n") } system("pause") return 0 }
标签: include stdlib float gread
上传时间: 2014-01-15
上传用户:waizhang
河內塔問題 #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次\n",fun_a(n)) printf("是否顯示移動過程? 是請輸入1,否則輸入0\n") scanf("%d",&option) if(option==1) { fun_b(n,1,2,3) } system("pause") return 0 } int fun_a(int n) { int sum1=2,sum2=0,i for(i=n i>1 i--) { sum1=sum1*2 } sum2=sum1-1 return sum2 } void fun_b(int n,int left,int mid,int right) { if(n==1) printf("把第%d個盤子從第%d座塔移動到第%d座塔\n",n,left,right) else { fun_b(n-1,left,right,mid) printf("把第%d個盤子從第%d座塔移動到第%d座塔\n",n,left,right) fun_b(n-1,mid,left,right) } }
上传时间: 2016-12-08
上传用户:努力努力再努力
Problem B:Longest Ordered Subsequence A numeric sequence of ai is ordered if a1 < a2 < ... < aN. Let the subsequence of the given numeric sequence (a1, a2, ..., aN) be any sequence (ai1, ai2, ..., aiK), where 1 <= i1 < i2 < ... < iK <= N. For example, sequence (1, 7, 3, 5, 9, 4, 8) has ordered subsequences, e. g., (1, 7), (3, 4, 8) and many others. All longest ordered subsequences are of length 4, e. g., (1, 3, 5, 8).
标签: Subsequence sequence Problem Longest
上传时间: 2016-12-08
上传用户:busterman
function [U,center,result,w,obj_fcn]= fenlei(data) [data_n,in_n] = size(data) m= 2 % Exponent for U max_iter = 100 % Max. iteration min_impro =1e-5 % Min. improvement c=3 [center, U, obj_fcn] = fcm(data, c) for i=1:max_iter if F(U)>0.98 break else w_new=eye(in_n,in_n) center1=sum(center)/c a=center1(1)./center1 deta=center-center1(ones(c,1),:) w=sqrt(sum(deta.^2)).*a for j=1:in_n w_new(j,j)=w(j) end data1=data*w_new [center, U, obj_fcn] = fcm(data1, c) center=center./w(ones(c,1),:) obj_fcn=obj_fcn/sum(w.^2) end end display(i) result=zeros(1,data_n) U_=max(U) for i=1:data_n for j=1:c if U(j,i)==U_(i) result(i)=j continue end end end
标签: data function Exponent obj_fcn
上传时间: 2013-12-18
上传用户:ynzfm
Hello User This is nothing, but a simple program which if kept in start of windows will shut down the system by itself within five minutes of starting. It takes the time from the system & starts its timer to shut down after 5 minutes (not considering seconds). U can use shutdown.exe,once started there is only one exit that u know only. EXIT : DOUBLECLICK TIME TO ENABLE EXIT
标签: nothing program windows simple
上传时间: 2016-12-26
上传用户:ynwbosss
Hello User This is nothing, but a simple program which if kept in start of windows will shut down the system by itself within five minutes of starting. It takes the time from the system & starts its timer to shut down after 5 minutes (not considering seconds). U can use shutdown.exe,once started there is only one exit that u know only. EXIT : DOUBLECLICK TIME TO ENABLE EXIT
标签: nothing program windows simple
上传时间: 2014-12-20
上传用户:xinyuzhiqiwuwu
Hello User This is nothing, but a simple program which if kept in start of windows will shut down the system by itself within five minutes of starting. It takes the time from the system & starts its timer to shut down after 5 minutes (not considering seconds). U can use shutdown.exe,once started there is only one exit that u know only. EXIT : DOUBLECLICK TIME TO ENABLE EXIT
标签: nothing program windows simple
上传时间: 2016-12-26
上传用户:xfbs821
Hello User This is nothing, but a simple program which if kept in start of windows will shut down the system by itself within five minutes of starting. It takes the time from the system & starts its timer to shut down after 5 minutes (not considering seconds). U can use shutdown.exe,once started there is only one exit that u know only. EXIT : DOUBLECLICK TIME TO ENABLE EXIT
标签: nothing program windows simple
上传时间: 2016-12-26
上传用户:lx9076