溫度華氏轉(zhuǎn)變攝氏
#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等級(jí)!!\n")
else if (a>=80)
printf("73分=B等級(jí)!!\n")
else if (a>=70)
printf("73分=C等級(jí)!!\n")
else if (a>=60)
printf("73分=D等級(jí)!!\n")
else if (a<60)
printf("73分=E等級(jí)!!\n")
}
{
if (b>=90)
printf("b=A等級(jí)!!\n")
else if (b>=80)
printf("85分=B等級(jí)!!\n")
else if (b>=70)
printf("85分=C等級(jí)!!\n")
else if (b>=60)
printf("85分=D等級(jí)!!\n")
else if (b<60)
printf("85分=E等級(jí)!!\n")
}
{
if (c>=90)
printf("c=A等級(jí)!!\n")
else if (c>=80)
printf("66分=B等級(jí)!!\n")
else if (c>=70)
printf("66分=C等級(jí)!!\n")
else if (c>=60)
printf("66分=D等級(jí)!!\n")
else if (c<60)
printf("66分=E等級(jí)!!\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).
This tutorial white-paper illustrates practical aspects of FIR
filter design and fixed-point implementation along with the
algorithms available in the Filter Design Toolbox and the
Signal Processing Toolbox for this purpose.