Skip to main content
Commonmark migration
Source Link

##C++, 154 Bytes

C++, 154 Bytes

#include <iostream.h>
#include "string.h"
using namespace std;

void encript_string() {
char en[26],in[1024];
string s=cin.getline();
strcpy(en,s.c_str());
while(1){
 s=cin.get_line();
 strcpy(in,s.c_str());
 int i=0,m=0;
 while(in[i] != 10) {
  m=in[i]-97;
  cout<<en[m];
 }
 cout<<"\n";
}
}

##C++, 154 Bytes

#include <iostream.h>
#include "string.h"
using namespace std;

void encript_string() {
char en[26],in[1024];
string s=cin.getline();
strcpy(en,s.c_str());
while(1){
 s=cin.get_line();
 strcpy(in,s.c_str());
 int i=0,m=0;
 while(in[i] != 10) {
  m=in[i]-97;
  cout<<en[m];
 }
 cout<<"\n";
}
}

C++, 154 Bytes

#include <iostream.h>
#include "string.h"
using namespace std;

void encript_string() {
char en[26],in[1024];
string s=cin.getline();
strcpy(en,s.c_str());
while(1){
 s=cin.get_line();
 strcpy(in,s.c_str());
 int i=0,m=0;
 while(in[i] != 10) {
  m=in[i]-97;
  cout<<en[m];
 }
 cout<<"\n";
}
}
added 80 characters in body
Source Link

##C++, 102154 Bytes

#include <iostream.h>
#include "string.h"
using namespace std;

void encript_string() {
char en[26],in[1024];
string s=cin.getline();
strcpy(en,s.c_str());
while(1){
 s=cin.get_line();
 strcpy(in,s.c_str());
 int i=0,m=0;
 while(in[i] != 10) {
  m=in[i]-97;
  cout<<en[m];
 }
 cout<<"\n";
}
}

##C++, 102 Bytes

void encript_string() {
char en[26],in[1024];
string s=cin.getline();
strcpy(en,s.c_str());
while(1){
 s=cin.get_line();
 strcpy(in,s.c_str());
 int i=0,m=0;
 while(in[i] != 10) {
  m=in[i]-97;
  cout<<en[m];
 }
 cout<<"\n";
}
}

##C++, 154 Bytes

#include <iostream.h>
#include "string.h"
using namespace std;

void encript_string() {
char en[26],in[1024];
string s=cin.getline();
strcpy(en,s.c_str());
while(1){
 s=cin.get_line();
 strcpy(in,s.c_str());
 int i=0,m=0;
 while(in[i] != 10) {
  m=in[i]-97;
  cout<<en[m];
 }
 cout<<"\n";
}
}
fixed formatting
Source Link
user45941
user45941

##C++, 102 Bytes

void encript_string() { char en[26],in[1024]; string s=cin.getline(); strcpy(en,s.c_str()); while(1){ s=cin.get_line(); strcpy(in,s.c_str()); int i=0,m=0; while(in[i] != 10) { m=in[i]-97; cout<<en[m]; } cout<<"\n"; } }

void encript_string() {
char en[26],in[1024];
string s=cin.getline();
strcpy(en,s.c_str());
while(1){
 s=cin.get_line();
 strcpy(in,s.c_str());
 int i=0,m=0;
 while(in[i] != 10) {
  m=in[i]-97;
  cout<<en[m];
 }
 cout<<"\n";
}
}

##C++, 102 Bytes

void encript_string() { char en[26],in[1024]; string s=cin.getline(); strcpy(en,s.c_str()); while(1){ s=cin.get_line(); strcpy(in,s.c_str()); int i=0,m=0; while(in[i] != 10) { m=in[i]-97; cout<<en[m]; } cout<<"\n"; } }

##C++, 102 Bytes

void encript_string() {
char en[26],in[1024];
string s=cin.getline();
strcpy(en,s.c_str());
while(1){
 s=cin.get_line();
 strcpy(in,s.c_str());
 int i=0,m=0;
 while(in[i] != 10) {
  m=in[i]-97;
  cout<<en[m];
 }
 cout<<"\n";
}
}
added 36 characters in body
Source Link
Loading
cleanup
Source Link
user45941
user45941
Loading
Source Link
Loading