Mercurial Hosting > asciicaesar
annotate asciicaesar.c @ 1:ba8447ba5f5c
Fully functional.
| author | VilyaemKenyaz |
|---|---|
| date | Wed, 23 Aug 2023 14:10:27 -0400 |
| parents | d0fbe0f50dfb |
| children | c96b197faa9d |
| rev | line source |
|---|---|
| 0 | 1 // Encryption and Decryption Program |
| 2 | |
| 3 #include <stdio.h> | |
| 4 #include <stdlib.h> | |
| 5 #include <string.h> | |
| 6 | |
| 7 void main(int argc, char*argv[]){ | |
| 8 char *string = argv[1]; | |
| 9 int modifier = atoi(argv[2]); | |
| 10 char newchar; | |
| 11 for(int i = 0;i != strlen(string);i++){ | |
| 12 newchar = string[i] + modifier; | |
| 13 printf("%c",newchar); | |
| 14 } | |
| 15 exit(0); | |
| 16 } |
