By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,490 Members | 1,417 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,490 IT Pros & Developers. It's quick & easy.

How made decoder.

P: 1
#include "stdafx.h"
#include <iostream>
#include <string>

using std::wcin;
using std::wcout;
using std::wstring;

int main()
{

wcout << L"Введите предложение: ";
wstring txt;
getline(std::wcin,txt);
for (size_t i = 0; i < txt.length(); ++i)
{
if (txt[i]==L'а')
wcout << L"15";
if (txt[i]==L'б')
wcout << L"16";
if (txt[i]==L'А')
wcout << L"17";
if (txt[i]==L'в')
wcout << L"18";
if (txt[i]==L'г')
wcout << L"19";
Jul 13 '19 #1
Share this Question
Share on Google+
1 Reply


100+
P: 103
- Use code tags.
- Explain what you are trying to do or what's the logic.
- What are the errors if you are getting some.
- The purpose of the code here looks like decoding of a string. But nothing can be said by looking at the incomplete code without any description.
Jul 14 '19 #2

Post your reply

Sign in to post your reply or Sign up for a free account.