Created
May 30, 2018 09:11
-
-
Save wirajayaabadi/9268d30d7cb0fe114603920dd313a7d3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include <conio.h> | |
| #include <String.h> | |
| using namespace std; | |
| void enkripsi(char kalimat[100]){ | |
| int tes,i=0; | |
| while(kalimat[i]!=0){ | |
| if(kalimat[i]==' '){ | |
| tes=0; | |
| }else{ | |
| tes=(int(kalimat[i])+3)%255; | |
| } | |
| cout<<char(tes); | |
| i++; | |
| } | |
| } | |
| int main(){ | |
| char kalimat[100]; | |
| cout<<"Silahkan ketik kalimat : "; | |
| cin.getline(kalimat,100); | |
| cout<<"Hasil : "; | |
| enkripsi(kalimat); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment