Would you help me guys?! | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Would you help me guys?!

It has some silly mistakes,i give it 10,it says 1 is a number And i give it @ it says it’s a number I can’t understand why it doesn’t work I need help https://code.sololearn.com/cdSkolFevGAG/?ref=app

7th Nov 2019, 7:57 AM
Laya Mousavi
9 Answers
+ 1
Avinesh thanks so much🤦🏻‍♀️🤦🏻‍♀️🙋🏻‍♀️🙋🏻‍♀️
7th Nov 2019, 2:05 PM
Laya Mousavi
0
Laya Mousavi run it. #include <stdio.h> int main() { char b; printf("enter the character:"); scanf("%c",&b); (b>='A' && b<='Z')?((b=='A'||b=='E'||b=='I'||b=='O'|| b=='U')?(printf("\n %c is a vowel letter",b)):(printf("\n %c is consonant letter",b))):((b>=48 && b<=57)?(printf("\n %c is a number",b)):(printf("\n %c is an other character",b))); return 0; }
7th Nov 2019, 8:30 AM
Avinesh
Avinesh - avatar
0
Avinesh thanks a lot😌🙋🏻‍♀️ also i have to write a program which takes for example laya then it’s output have to be aaly(arrange the input letters with the alphabet arrangments) but i don’t know how i can compare the letters(which one should have be sooner or later) would you help me??
7th Nov 2019, 9:22 AM
Laya Mousavi
0
Laya Mousavi I helped you because you tried these questions by yourself and then you got stuck. So try that by yourself and then post it if you don't get it.
7th Nov 2019, 9:25 AM
Avinesh
Avinesh - avatar
0
the last program is ok but when take it 100 it says 1 is a number😐why?!it doesn’t see 00😐 and why did u wrote b=<48 && b>=57?! i want it to works for all numbers tnaks for your help i will try for writing that program if it doesnt run i will ask you for help🤦🏻‍♀️😢 Avinesh
7th Nov 2019, 9:55 AM
Laya Mousavi
0
Laya Mousavi for numbers 0 to 9 the ASCII value are from 48 to 57. Larger numbers are not provided any ASCII value.
7th Nov 2019, 9:58 AM
Avinesh
Avinesh - avatar
0
oh it means asll undrestand just 0 to 9?! so what can i do for exp 65?! Avinesh
7th Nov 2019, 10:46 AM
Laya Mousavi
0
Laya Mousavi You cannot because when you take the user input as a number it should be below or equal to 127 since that is the range of char and it will only print the element with that ASCII value.
7th Nov 2019, 11:12 AM
Avinesh
Avinesh - avatar
0
Laya Mousavi you're welcome
7th Nov 2019, 2:07 PM
Avinesh
Avinesh - avatar