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 5 years ago
    Tags:
  • Programming


hermesesus 5 years ago
I think you forgot "THEN". Try: IF (X = 1) THEN { Disp "Oh, is that so?" } ELSE { Disp "Oh, ok then." }
bubbsandbubbs3 5 years ago
Still doesn't work, but thanks for the tip.
hermesesus 5 years ago
Try this: If...Then...Else...IfEnd
TekTuS 5 years ago
think you forgot "THEN".
bubbsandbubbs3 5 years ago
Still doesn't work, but thanks for the tip.
amante 5 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 5 years ago
Still not working, thanks though
Wrichik Biswas 5 years ago
Try using 3 equal signs not one
evolbug 5 years ago
99% it's double equal signs. if (x == 1)
mjavad 5 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 5 years ago
I don't know and I really think you cant
bubbsandbubbs3 5 years ago
You can, it's just a syntax error...
Sir_Lagsalot 5 years ago
two equals signs, a THEN, and swap display for printf?
smifjay 5 years ago
this is crazy.
Marko Vrček 5 years ago
if (X = 1) { Disp "Oh, is that so?"; } else { Disp "Oh, ok then."; }
Rahul Patil 5 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 5 years ago
Still doesn't work, but thanks for the precision
theUnifiedMind 5 years ago
:If X=1:Then
:Disp "Oh, is that so?"
:Else:Disp "Oh, ok then."

See if that works...
Umair Qasim 5 years ago
yes you can make such a program .it is nice to you
Ulises Bojorquez 5 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 5 years ago
if (X = 1) { Disp "Oh, is that so?"; } else { Disp "Oh, ok then."; }
AZR 5 years ago
PROGRAM:



ClrHome

Prompt X

If X=1

Then

Disp "Oh, ok then"

End
miel 5 years ago
I Dont know !
Amna Sami 5 years ago
Use arduino
hem 5 years ago
why don't you try: IF (X = 1) THEN { Disp "Oh, is that so?" } ELSE { Disp "Oh, ok then." }
Matías Valia 5 years ago
I think you should use (X == 1) instead (X=1)
Sim On 5 years ago
Recherche from google to the answer
pounder 5 years ago
Depends on the language. I think it's because you need (X==1)
spyripper 5 years ago
you should try if(x==1)
eloquentboot 5 years ago
You forgot the "then"
Abhi Psl 5 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 5 years ago
No, it uses Disp command instead of Printf