+ 5
read and write files
how to i import these files https://code.sololearn.com/cT6KZ6O6oG00/?ref=app https://code.sololearn.com/cT6KZ6O6oG00/?ref=app
20 Respostas
+ 7
I'm not sure you can import with sololearn editor
+ 5
♠👑 ℍⓄlʸᵇ𝕆𝒾 👍♦
I donno much about C so can't help 😔
+ 4
but it display
Enter an operator (winnerm();winnerp();winnere();justicem();justicep();justicee();mirianm();mirianp();miriane();preciousm();preciousp();preciouse();): pe//my input
[Program finished]
Jayakrishna🇮🇳 ,JOY ,ㅤㅤㅤㅤ ɒʞiʜꙅᴎA 🎵🎶 ,Aji ꦄꦗꦶ ,🛡️Dream Killer🗡️ ,⸙ƵØ¥₳⸙
+ 3
Cyber Nate even if not with sololearn. i have c ide with me
+ 3
have you do atm program before at any language
+ 3
No useful knowledge about #C unfortunately😔
+ 3
For your original program, this works.. Charecter constant means single charecter only.. So I mean this way... Alternative.
Using strings in switch cases in not valid.
int main(){
char operate;
printf("Enter an operator alphabet a to l: ");
scanf("%c", &operate);
switch(operate)
{
case 'a':winnerm();
break;
case 'b': winnerp();
break;
case 'c':winnere();
break;
case 'd':justicem();
break;
case 'e':justicep();
break;
case 'f':justicee();
break;
case 'g':mirianm();
break;
case 'h':mirianp();
break;
case 'i':miriane();
break;
case 'j':preciousm();
break;
case 'k':preciousp();
break;
case 'l':preciouse();
break;
}
return 0;
}
+ 2
C don't have string type, you can use a charecter array for that and also won't possible to use in switch cases. C switch cases shloud be a Integer constant.
+ 2
Jayakrishna🇮🇳 how? pls explain
if possible with examples
+ 2
write a code or edit the code for me
+ 2
int main(){
//string operate; //its invalid, you can use a charecter like
char operate;
scanf("%c", &operate);
switch(operate)
{
/*
case 'winnerm() ': //this is also invalid
winnerm();
break;
case 'winnerp() ':winnerp();
break;
*/
//you can do like this instead,
case 'w' : winnerm();
break;
case 'p' : winnerp();
break;
Similar way you can continue....♠👑 ℍⓄlʸᵇ𝕆𝒾 👍♦
..
+ 2
Jayakrishna🇮🇳 thanks bro. let me try that
+ 2
it works bro but the didnt show
+ 2
What not showing..?
+ 2
edit the code and run pls Jayakrishna🇮🇳
+ 2
♠👑 ℍⓄlʸᵇ𝕆𝒾 👍♦
I already tried and given answer for possible solution. Now try that way and if not solved, then post your updated code with specifying problems with a clarity.. Tq...
+ 2
guys. it works. thanks to all my friends that contributed. I APPRECIATE
https://code.sololearn.com/cdMXwL9u3uKD/?ref=app
Jayakrishna🇮🇳 ,Cyber Nate ,Amethyst Animion ,Vic-AutoCoder🖥️ ,Namit Jain ,
+ 2
Jayakrishna🇮🇳 yeah thats true