Supported cryptocurrencies:
BTC BTC
BCH Bitcoin Cash
NANO NANO
XTZ Tezos
0.0005 BTC
EnglishI'm making a program that runs on a graphing calculator and I need help

I program in various languages in my free time, and recently I've been toying around with the PRGM function on graphing calculators. If anyone can fix this syntax for me they will be rewarded. if (X = 1) { Disp "Oh, is that so?" } else { Disp "Oh, ok then." } The error should be in getting the if loop to work

bubbsandbubbs3 8 years ago
    Tags:
  • Programming


hermesesus 8 years ago
I think you forgot "THEN". Try: IF (X = 1) THEN { Disp "Oh, is that so?" } ELSE { Disp "Oh, ok then." }
bubbsandbubbs3 8 years ago
Still doesn't work, but thanks for the tip.
hermesesus 8 years ago
Try this: If...Then...Else...IfEnd
TekTuS 8 years ago
think you forgot "THEN".
bubbsandbubbs3 8 years ago
Still doesn't work, but thanks for the tip.
amante 8 years ago
Ok so if I'm not mistaken, PRGM uses C. So your problem is probably that you have one equals sign instead of two.

Try if (X == 1) instead.
bubbsandbubbs3 8 years ago
Still not working, thanks though
Wrichik Biswas 8 years ago
Try using 3 equal signs not one
evolbug 8 years ago
99% it's double equal signs. if (x == 1)
mjavad 8 years ago
The best guide is to test it in your models test and dont be shy i am sure that it help you.
fareed9808 8 years ago
I don't know and I really think you cant
bubbsandbubbs3 8 years ago
You can, it's just a syntax error...
Sir_Lagsalot 8 years ago
two equals signs, a THEN, and swap display for printf?
smifjay 8 years ago
this is crazy.
Marko Vrček 8 years ago
if (X = 1) { Disp "Oh, is that so?"; } else { Disp "Oh, ok then."; }
Rahul Patil 8 years ago
If x==0
:Then
:Disp "Oh, is that so?" {Disp is in PRGM under I/O} {Words within "" are typed using ALPHA}

:Else
Disp "Oh, ok then." >>just copy paste the same code ,check if that helps :)
bubbsandbubbs3 8 years ago
Still doesn't work, but thanks for the precision
theUnifiedMind 8 years ago
:If X=1:Then
:Disp "Oh, is that so?"
:Else:Disp "Oh, ok then."

See if that works...
Umair Qasim 8 years ago
yes you can make such a program .it is nice to you
Ulises Bojorquez 8 years ago
hello the error is in the X=1 you should put X==1 , like this I think if (X == 1) { Disp "Oh, is that so?" } else { Disp "Oh, ok then." }
Usman Tahir 8 years ago
if (X = 1) { Disp "Oh, is that so?"; } else { Disp "Oh, ok then."; }
AZR 8 years ago
PROGRAM:



ClrHome

Prompt X

If X=1

Then

Disp "Oh, ok then"

End
miel 8 years ago
I Dont know !
Amna Sami 8 years ago
Use arduino
hem 8 years ago
why don't you try: IF (X = 1) THEN { Disp "Oh, is that so?" } ELSE { Disp "Oh, ok then." }
Matías Valia 8 years ago
I think you should use (X == 1) instead (X=1)
Sim On 8 years ago
Recherche from google to the answer
pounder 8 years ago
Depends on the language. I think it's because you need (X==1)
spyripper 8 years ago
you should try if(x==1)
eloquentboot 8 years ago
You forgot the "then"
Abhi Psl 8 years ago
In C You should write like this

if (X==1)

{

printf("%s","Oh, is that so?");

}

else

{

printf("%s","Oh, ok then.");

}
bubbsandbubbs3 8 years ago
No, it uses Disp command instead of Printf