溫度華氏轉變攝氏
#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
}
跨數據庫平臺:
n 支持 oracle 的OCI
n 支持DB2的CLI,
n 支持ODBC(通過ODBC,可支持SQL SERVER,MySQL等)
Ø 跨OS平臺:
n 標準C++語言,支持 unix/linux/windows
Ø 使用簡單:
n 只有一個頭文件
n 接口簡潔.otl_stream, otl_connect, otl_exception等就可以完成大部分工作
n 相對 ProC等嵌入式開發,代碼能相應減少
Ø 性能:
n 直接訪問數據庫API接口,具有API接口的高效率,可靠性
Ø 穩定性:
n 開源代碼,唯一的代碼文件otlv4.h,可以了解所有基于數據庫API的實現細節
n 從1996年開始,到今已10余年.
Ø 可讀性及可維護性:
n 標準C++代碼,不需要任何預處理
n 使用流的形式,輸入輸出異常簡潔
n 減少大量代碼,
n 代碼結構更加簡潔
參考資料:
http://otl.sourceforge.net/