I tried to twist somethings but am not getting my desired output. Please I need help the code is given below 👇 | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

I tried to twist somethings but am not getting my desired output. Please I need help the code is given below 👇

#include <stdio.h> int main() { char a =getchar(); char b =getchar(); char c = a * b; printf("first letter: %c\n", a); printf("second letter: %c\n", b); printf("Letter Multiplication: %c", c); return 0; }

14th Nov 2019, 7:07 PM
Balogun Daniel
Balogun Daniel - avatar
2 Answers
+ 2
You need to work with integers for maths. Use int instead of char. Print with %d instead of %c Use scanf() instead of getchar
14th Nov 2019, 7:55 PM
Fernando Pozzetti
Fernando Pozzetti - avatar
+ 1
you know ascii is only upto 127 right
14th Nov 2019, 7:23 PM
✳AsterisK✳
✳AsterisK✳ - avatar