w0lfyyy
-
Posts
8 -
Joined
-
Last visited
Posts posted by w0lfyyy
-
-
in C++
pe wiki nu pot gasi nici un pseudocod,nici macar informatii despre mansfield sau transpozitie.....sa nu mai vorbesc cod sursa....
-
Vreau si eu pseudocod de la criptarea caesar / decriptarea mansfield / criptarea 2 jumatati transpozitie daca are cineva va rog lasati mai jos .Multumesc
-
Este un pic mai complex decat ce vroiam.insa tot nu reusesc sa introduc programu meu intr'un submeniu...
-
#include <iostream>
using namespace std;
char caesar( char );
int main()
{
int option;
do
{
cout << "1) Criptarea Cesar " << endl;
cout << "2) Underconstruction" << endl;
cout << "Please select an option : ";
cin >> option;
if (option == 1)
{
{
string input;
do {
cout << "Enter cipertext and press enter to continue." << endl;
cout << "Enter blank line to quit." << endl;
getline(cin, input);
string output = "";
for(int x = 0; x < input.length(); x++)
{
output += caesar(input[x]);
}
cout << output << endl;
} while (!input.length() == 0);
} //end main
char caesar( char c )
{
if( isalpha(c) )
{
c = toupper(c); //use upper to keep from having to use two seperate for A..Z a..z
c = (((c-65)+13) % 26) + 65;
}
//if c isn't alpha, just send it back.
return c;
}
return 0;
}----
alta varianta la limita dar nu inteleg altceva
#include<iostream>
#include<stdlib.h>
#include<iomanip>
#include<time.h>
#include<stdio.h>
using namespace std;
int prima()
{
system("color 0b");
system("cls");
cout << endl << endl << endl;
cout << " Program tema de casa,10+ " << endl;
cout << "________________________________________________________________________________" << endl << endl;
cout << " Introduceti cifra corespunzatoare optiunii dorite: " << endl << endl;
cout << " 2) Cesare" << endl;
cout << " 3) Despre program" << endl << endl;
cout << " 0) Iesire" << endl << endl << endl;
cout << "Optiunea: ";
return 1;
}
int despre()
{
system("color 0f");
system("cls");
cout << endl << endl << endl << endl << endl;
cout << " > Bine ati venit! < " << endl << endl << endl;
cout << "_______________________________________________________________________________" << endl;
cout << "9) Meniu anterior 0) Iesire program " << endl << endl;
cout << "Optiunea: ";
return 1;
}
int meniu3()
{
system("color 0a");
system("cls");
cout << endl;
cout << " Cesare " << endl;
char caesar(char);
{
string input;
do {
cout << "Enter cipertext and press enter to continue." << endl;
cout << "Enter blank line to quit." << endl;
getline(cin, input);
string output = "";
for (int x = 0; x < input.length(); x++)
{
output += caesar(input[x]);
}
cout << output << endl;
} while (!input.length() == 0);
}
char caesar(char c)
{
if (isalpha(c))
{
c = toupper(c); //use upper to keep from having to use two seperate for A..Z a..z
c = (((c - 65) + 13) % 26) + 65;
}
return c;
}
}
int iesire()
{
system("color 0f");
system("cls");
cout << endl << endl << endl << endl << endl;
cout << "_______________________________________________________________________________" << endl;
cout << "| ATI ALES SA IESITI DIN PROGRAM |" << endl;
cout << "| |" << endl;
cout << "| |" << endl;
cout << "| VA MULTUMIM |" << endl;
cout << "| |" << endl;
cout << "| |" << endl;
cout << "| |" << endl;
cout << "| |" << endl;
cout << "|_____________________________________________________________________________|" << endl << endl << endl;
cout << " 2015 ";
return 1;
}
int main(int argc, char *argv[])
{
int i = 1;
if (argc > 1)
i = atoi(argv[1]);
else
prima();
while (i != 0)
{
if (i == 9) prima();
cin >> i;
if (i == 3) meniu3();
if (i == 8) despre();
}
if (i == 0) iesire();
}cand sterg if (i == 3) meniu3(); si int meniu3() dau run si merge.
cand imi bag programu nu mai merge
wtf
-
am meniu,am programu dar c?nd sunt in meniu si apas 1 pentru programu x sa mi se deschida o alta fereastra ( unde sa aibe si optinunea de back" la meniu) nu sa imi arate sub meniu imediat..
"system("cls");" stiam ca e,dar nu pricep...
prin/cum ce leg mai exact meniu-program-program-program ?
Criptare / pseudocod
in Programare
Posted
da,
orice cod sursa sau orice descriere mansfield / transpozitie e buna,fie ca e intreaga sau cateva randuri....