c++ dynamic array function

JuliusCaesarusedhiswaytoencrypttext.Eachletterisreplacedbythefollowinginalphabeticalo... Julius Caesar used his way to encrypt text. Each letter is replaced by the following in alphabetical order by K positions in the circle.
You are given a cypher. Your task is to write a program that outputs plain text.

Note:
cypher - encrypted message.
plain text - decrypted message.

Input
Input contains two rows.
First row is a cypher, consisting of uppercase Latin characters.
Second row contains number K.

Output
Output must contain the result of the decryption, that is, plain text.

Sample test(s)
№ Input (cypher) Output (plain text)
1 XPSE
1 WORD
2 ZABC
3 WXYZ
展开
 我来答
手机用户14188
2011-11-02 · 超过15用户采纳过TA的回答
知道答主
回答量:260
采纳率:0%
帮助的人:77.9万
展开全部
#include <iostream>
using namespace std;

void swap2(unsigned int *a, unsigned int *b)
{
unsigned int c;
c = *a;
*a = *b;
*b = c;
}

int main()
{
unsigned int a, b;
cin >> a >> b;
swap2(&a, &b);
cout << a << " " << b << endl;
return 0;
}
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式