Skip to content
View in the app

A better way to browse. Learn more.

Coldplaying

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

The Former Sara And Milica Thread

Featured Replies

:nice:

 

So what're you peeps up to?

  • Replies 103
  • Views 3.2k
  • Created
  • Last Reply

Top Posters In This Topic

Ok, I gets it naow.

 

program pr4;

var a,b,c:integer;

begin

readln(a);

readln(b);

if a>b then c:=1

else c:=0;

writeln©;

readln;

end.

 

 

Never put a ; right before else, it won't wanna work. Also, you can left out the else part, if you don't need it. Like:

 

program pr5;

var a,b,c,:integer;

begin

readln(a);

readln(b);

if a<0 then a:=a*(-1);

c:=a+b;

writeln©;

readln;

end.

 

 

Variables don't have to be called by only one letter, you can call them abc or whatever if you want. Also, try deleting the last readln and run the program to see what happens.

HAI GUIZE. :D

 

Oh, and Sara, I like the sig TONZ. :)

 

Hi. :D

  • Author
Ok, I gets it naow.

 

You talked just like me agains! :cheesy:

 

Also, try deleting the last readln and run the program to see what happens.

 

Ewwwww. That isn't good.

On some competitions we have to leave out the last readln. Maybe I'll explain it later. :thinking:

 

Are you having fun? :D

  • Author
Why isn't this STILL their thread?

 

Because theoretically, other people are supposed to join in on our Intellectual Discourse. :P

Read the first post, Clint.

  • Author

Okay! So where do we go from here? :P

Oh, you...! :P

 

program pr6;

var n,i,x,s:integer;

begin

readln(n);

for i:=1 to n do

begin

readln(x);

s:=s+x;

end;

writeln(s);

readln;

end.

 

See the yellow part? Well, you can also type the program like this:

 

program pr6;

var n,i,x,s:integer;

begin

readln(n);

for i:=1 to n do

begin

readln(x);

s:=s+x;

end;

writeln(s);

readln;

end.

 

It doesn't matter.

 

Edit: forum fail. Consider the _ as a space.

 

program pr6;

var n,i,x,s:integer;

begin

readln(n);

for i:=1 to n do

_begin

__readln(x);

__s:=s+x;

_end;

writeln(s);

readln;

end.

  • Author

Okay. That makes sense, because with the space indents, you can, like... organize it better, visually. yeah.

 

edit: what does "for i:=1 to n do" mean? :huh:

 

edit two: also you typed your program wrong I think :P did you mean "s:=i+x;" instead of "s:=s+x;"?

It's a loop that repeats n times. But you can put, for example,

 

for i:=2 to 5 do

s:=s+i;

 

 

I don't know if you noticed, but I put another begin and end in my previous post. If in a loop or under an if/else, or something other (I can't tell you everything now!), exists more than 1 command, you need an extra begin-end. That said, I don't need it in this post. But I could've put it, no harm will be done.

  • Author

:inquisitive:

 

Okay, I think I got it. Possibly.

@your edit 2: No, it's not wrong.

  • Author

But... but but it didn't do what it was supposed to do when I tried it.

 

Or maybe I just don't know what it's supposed to do :lol:

What? :confused:

  • Author

Exactly what I was thinking :lol:

 

What was that program SUPPOSED to do? Wasn't it supposed to, like........ add stuff? O_o

Eh. My bad. I guess my brain is shut down by now. :lol:

 

program pr6;

var n,i,x,s:integer;

begin

readln(n);

s:=0;

for i:=1 to n do

begin

readln(x);

s:=s+x;

end;

writeln(s);

readln;

end.

  • Author

oooohhh :surprised:

 

wait, no, still not working :P

Huh. What do you type when the program starts?

  • Author

um.

 

oh I'm an idiot XD I put in "1" even though I..... shouldn't have. Jkz.

I think you learned enough today. :D This is fuuunnnn. :wacko:

  • Author

Yeah, it is. :smart: I feel so nerdy, though.

  • 4 weeks later...

*saves thread from the depths of The Lounge*

 

Still remember what I've learned you? Can we move on? :D

  • Author

.........No, and no. :P

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.