Jak naprawić ten program?
#include <iostream> #include <string.h> using namespace std; int main() { //Program Morse'a #define max 200 int i; char szyfr[max]; char litery [26]= {'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'}; char morse[26]={'.-', '-...', '-.-.', '-..', '.', '..-.', '--.', '....', '..', '.---', '-.-', '.-..', '--', '-.', '---', '.--.', '--.-', '.-.', '...', '-', '..-', '...-', '.--', '-..-', '-.--', '--..' }; cout<<"Podaj slowo, ktore chcesz zaszyfrowac : "; cin.getline(szyfr, max); int dl=strlen(szyfr); for(int i=0; i<dl; i++) { cout<<("%d",(int)szyfr[i])<<endl; //Zmiana znaku na kod ASCII if(szyfr[i]>=97) { //Małe litery cout<<szyfr[i]-96; cout<<endl; cout<<morse[szyfr[i]-96]; } else { //Wielkie litery cout<<szyfr[i]-64; cout<<endl; cout<<morse[szyfr[i]-64]; } cout<<endl; } cout<<endl; system("pause"); }