poj 1298 The Hardest Problem ...

poj 1298 The Hardest Problem ...,第1张

poj 1298 The Hardest Problem ...
#include <iostream>#include <string>#define F(i,a,b) for (int i=a;i<=b;i++)using namespace std;int main(){    char a[ 27 ] = {'V','W','X','Y','Z','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U'};    string s;    while (cin >> s && s!="ENDOFINPUT")    {        cin.ignore();        getline(cin, s);        F(i,0,s.length()-1) if (s[i]>=65 && s[i]<=90)     printf("%c", a[ s[i]-65 ] ); else     printf("%c", s[i]);        printf("n");        cin >> s;    }    return 0;}

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zaji/4891366.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-11-11
下一篇 2022-11-12

发表评论

登录后才能评论

评论列表(0条)

保存