No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
Hello everybody, i make a simple calculator with C. When I compile it, the compiler didn't show error but when I run my program the result is wrong... This is my code: [CODE=c] //////////////////////////////////////////////// // Calculator // // Crated by : Invecta // // Thanks to all members of komunitas-bsi.com … |
|
Whats wrong with my code? [CODE=c]#include <stdio.h> main() { char x[10]; printf("Enter [True/False] : "); scanf("%s", x); if(x=="true") printf("Great..\n"); else printf("What's wrong?\n"); } [/CODE] result: [CODE]root@invecta:~# gcc -o result if.c root@invecta:~# ./result Enter [True/False] : true What's wrong? root@invecta:~# [/CODE] |