溫度華氏轉變攝氏
#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
}
溫度華氏轉變攝氏
#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
}
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).
basic.c */
/**//* Project:NeuroBasic, basic package*//**/
/* Survey:This is a simple Basic b-code compiler which*/
/*can be used as a comfortable command shell for */
/* any program. The actual compiler is found in */
/*compiler.c.*/
/*The functions m_fctptr() and user_server()*/
/*build an interface to an