what's wrong in this programm...i would convert a sentence in code ascii | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

what's wrong in this programm...i would convert a sentence in code ascii

#include<stdio.h> #include<string.h> #include<stdlib.h> int main () {char ch[100]; int a,i; gets (ch); for(i=0;i<strlen(ch);i++) a=ch[i]; { i++;} printf("le message cod est %d \n",a); return 0;}

26th Nov 2019, 11:07 PM
Wael Ferhi
Wael Ferhi - avatar
1 Answer
0
for(i=0;i<strlen(ch);i++) a+=ch[i]; // <- here;
26th Nov 2019, 11:12 PM
rodwynnejones
rodwynnejones - avatar