当前位置:首页>财经>正文

python小问题 用c 编写一个简单的货币转换程序

2023-07-03 12:03:23 互联网 未知 财经

 python小问题 用c  编写一个简单的货币转换程序

python小问题

import re
money = input().lower()
tmp=re.findall(usd|rmb,money)
if len(tmp) != 1:
    print(wrong)
money=re.sub(tmp[0],,money)
try:
    num=float(money)
    if usd in tmp:
        print(RMB%.2f%(num*6.78))
    else:
        print(USD%.2f%(num/6.78))
except:
    print(wrong)

用c 编写一个简单的货币转换程序

您好,这样呀:
#include
using namespace std
int main()
{int a,b,c,j=0
for(a=0a<=100a )
{
for(b=0b<=50b )
{ for(c=0c<=20c )
{
if((a b c==100)&&((a b*2 c*5)==100))
cout<<"第"<< j<<"种:"<<"1分"<
}
}
}
return 0
}