comparison asciicaesar.c @ 2:c96b197faa9d default tip

Autmatic Win32 Porting
author VilyaemKenyaz
date Thu, 28 Sep 2023 13:20:40 -0400
parents d0fbe0f50dfb
children
comparison
equal deleted inserted replaced
1:ba8447ba5f5c 2:c96b197faa9d
3 #include <stdio.h> 3 #include <stdio.h>
4 #include <stdlib.h> 4 #include <stdlib.h>
5 #include <string.h> 5 #include <string.h>
6 6
7 void main(int argc, char*argv[]){ 7 void main(int argc, char*argv[]){
8 char *string = argv[1]; 8 char *string = argv[1];
9 int modifier = atoi(argv[2]); 9 int modifier = atoi(argv[2]);
10 char newchar; 10 char newchar;
11 for(int i = 0;i != strlen(string);i++){ 11 for(int i = 0;i != strlen(string);i++){
12 newchar = string[i] + modifier; 12 newchar = string[i] + modifier;
13 printf("%c",newchar); 13 printf("%c",newchar);
14 }
15 exit(0);
14 } 16 }
15 exit(0);
16 }