Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

hellloooaaaa

Name: Anonymous 2011-10-10 15:12

#include<iostream>
using namespace std;



int main( )
 {
   
 int x, sum, counter, sonuc;
 sum = 0;
 counter = 0;
 

 
 cout<<"ortalamasini almak istediginiz 5 numara girin"<<endl;
 cout<<"enter a number"<<endl;
 cin>>x;
 sum = sum + x;
 counter = counter + 1;
 
 
 cout<<"enter another number"<<endl;
 cin>>x;
  sum = sum + x;
 counter = counter + 1;

 cout<<"enter another number"<<endl;
 cin>>x;
  sum = sum + x;
 counter = counter + 1;
  cout<<"enter another number"<<endl;
 cin>>x;
  sum = sum + x;
 counter = counter + 1;
  cout<<"enter another number"<<endl;
 cin>>x;
  sum = sum + x;
 
 counter = counter + 1;
 sonuc = sum/counter;
 
 
 cout<<"sonuc = ";
 cout<<sonuc<<endl;
 
 system("PAUSE");
 
   return 0;
}





teach me how to loop this.yes,i'm a complete retard.

Name: Anonymous 2011-10-10 15:13

forgot to add, trying to get the average of given 5 numbers.

Name: Anonymous 2011-10-10 15:26

>>2
You forgot your [code] tags

Name: Anonymous 2011-10-10 17:15

You need to use something called a label. Put this where you want your loop to start:

loop:

and then when you want to loop, you write goto loop;

For example:

int i = 0;

loop:
    puts("This gets executed 5 times.");

if (i++ < 5)
    goto loop;

Name: Anonymous 2011-10-10 22:22

>>4
Do what this person says. Use goto as often as you can and you will be an expert programmer in no time!

Name: Anonymous 2011-10-10 23:17

>>4
The more expert way to do it is with call/cc:



(let ((i 0)
      (back (call-with-current-continuation (lambda (x) x))))
  (display "This gets executed 5 times, expertly.")
  (when (< i 5)
    (set! i (+ 1 i))
    (back back)))

Name: Anonymous 2011-10-10 23:45

>>5

for expert educational value, teach the students if, goto, printf and scanf, and then have them solve all problems.

Name: Anonymous 2011-10-10 23:48

>>6
that would work if you had used define twice instead of let once. Just sayan.

Name: sage 2013-12-16 13:09

(̷̶̡͙̬̝͖͕͓̱͇̦͈̪̰̜̝̗̮ͦͬ͌̆͑́っͩͨ̇̽̑͐̂ͩ̔̓̇̆҉̷̳̭͙͇̝̺̪̝͢͝λ̧̨̬̼̞̥̲̤̺̯͙̬͍̱̥̺̊́̊ͮ͡♡͙̗̦̦̜͖͖̠̻͎͚̾͌̂̀̍̆̎̈̔ͧ̎͒͊͟͢͟Д̂ͦ̉͒ͥ̅̓ͬ͝҉̴̤͖͍͉͜͟♡̝̯̣̲͈͇̒̀̅͑ͬ̔̃͢͢͡)̊̽ͤ͑̊̌̏̈́ͮͧͯͬ͊̅̏ͭ͏̵̢̫̬͚̩͝っ̷̸̨̪͇͍͓̼͙̩̖̬͈̝͚̯̺̱̹͉̼̓ͬ́ͬ͋ͪ͌͂̆͋̓̔ͪ̓̎͡ᕦ̴̞̯͇̺͈͔̩͖̜̝̮̓ͩ̊̈́̆̉̑ͧͮ̑ͣ̿ͮ͊́͡(̬̪͎̰͚̜̯͇̻̥͍̮̬͕̯͖͙ͤͣ̾͛͠ͅ`̲̦̞̯͎̻̰̉̏ͦ̉̾̍̅̾̑͊̑͗ͬͩͪ̚͟ಠ̒̊͌͋̇̽̋̽̉ͥ̔̑ͭ͘͟͝҉̰̮͍͍͈̼͍̙̤͍͕̤̱͎͍͕̲̞̪ω̈́͆ͨ̔̐ͬ̒ͦͥ̽̆͑͑ͨ̌͏̀҉̣͉̖̲̻̫̥̥̝̻̱ಠ̧̩̦̬̯̲̹̊ͫ͋͊́͊̅̓̆̑̂͛̀̚͜)̸̷͇̭̟̞̮͉̺̋ͥͪͨ̋̓́ͫͩ̑̚ͅᕤ͊̃ͩͪ҉̵̨̱̤̗̘̘̖̀)̛͙̙͍͎̖̪ͦ͋̆̋̒̎ͫͬͩ̈̇͆ͣͬͥͨ̑̔͘͝)͎͙̮̺͙̠̟̘̹̙̟͈͂̆̾̿̀͘͟͝)̗̗̺̠̰̖̹̙̞̃͌̎̐ͦ͑̀ͥͭ̍̉̅̽̄͌͋̃̆͡͡★̴̵̧̢͕̲͙͇̳̻̙̤̲̞̫͔͈̖̠̪̪̤̆ͤ́͗͡ͅ≦̛͈̦̟͙̰̦̞̫̖͇ͪͣͪ̽̌̆̇̃̾̋̚͜͢⁎̉̉ͫ͊̄ͩͯͫ͑̍̇͌̇̆͊͟҉̧̩͇͈͎̪̪̝͈̮͕͈̮̣̻̳̺̖͔̕*̛̳̝͙̖̲͚̣̤̮̺̼̝̱̻̣̻̟͊̑͑̎̈̀ͧ̌͒͛̑ͦ̂̆̈̿̅́̚ͅ☠̬̗̜͙̪̜̘̭̥̰̱͉͍̠̼̮͗̂͐͐͒ͯ̃̈͂ͮ̓͗̑̊ͫ̓ͣ̀̀͡⁎̸͒̏̈́̓̏͛̾͑̑͗̊̿̇ͥ͞҉̵̧͖͍̻̰͓ꂚ͍̣͉̟̯͉̰̹ͥ͗͆ͬ̿͊̆͆ͯ͋ͯ̊͆ͧ͒͌̇̾͗͘*̶̷̣͈̝̣̲̟̩̌͗̌ͧ͋͑̈̃̽̊͑̇̑ͦ̿͜͢͝ͅᵎ̴̧͍̱̯̺͙̥̥͎̞̬̩͔͉̅ͫ̅̾̂ͤ̌ͅ=̶̛̱͈͎̘̥̒ͭͯ̋͐̅̓ ͤ̏̿̊̄͒͆͂̏ͯ̈́̇̎̓ͤͬ̍ͫ͟҉̡̦̫̤͎̼͙̣̻̳̤̤͉̩̭ͅ ̸̨̫͉̥̙͔͇̞̼̳̪̬͖̣͊̆͐͐͊̎͑ͯͩ̚͝ ̨͊͋ͪͮ̈̉̏̾̈́̉̋̈̄ͣ͆̏ͫ̚͏̟̩͈͕̥̤̘̯̼͚͚͘ ̸ͩͣ̓͑͌͠҉͈̯̼͍̭̤̘͈̫̝̣̙̱̦̫ ̶̜͕̯̮ͨ̐ͫͬ̐͂͛̄̉̽̐̓̕͢ͅ ̛̹̬̤͔̫͖͇̮̗̟͕̗̼̜͚̥̫̙͒͌̀͗̄ͯ̆͛͟ ̛̍ͨ̃̀ͣ̓ͩͣ̿̔̌͊ͦ͂͢҉̨̜̺͉̙̣̼̼̥͍͚̗͍̯̪̗̱ ̷̛ͧ̈ͮͧ͘͜͏̲̘̳̫̣̪̺̯̘̘ ̴̸̶̘̦̭̞͕̲͇͎̙̩̗͍͙͉̠ͭ̇̈́ͮ̌̐̆́̉̾̾̃̔̏ͭ͗̋̚͟ ̧̡̼͉̠̜̰̞͇̜̥̠͓̦͓͎͉̝̖̹͙̏͛̽ͮ̔͂͊́ ̶̴̡̛̣̗̗̳̪̫͖̥̘̻̳̦͕͇͚͕͕͑ͣ̈́̇ͬͭ̚̚͠ͅ ̵̷̛͎͍̙̩̘͐ͥͫ͐ͦ͆̾̊̐̓́ ̢̧̇̓ͫ̇̄̋̀ͬ͊̀ͧͦ͌͌̓҉͇̱͚̠̪̖͙͓̙̀ ̶̅͗̏ͣ̽ͤͣ͏̸̻̻̲̦̟̳̟̖̯͖̯̥̣͍̙̘̦Ψ̡̩͓͉̞̲̤̼̱̤̥̪͚̥̦͚̱̣̎ͭ̍̎̾͐͠_̴̡̛̝̫̻͖͇͎̳̯̗̟̜̬̤͚̻̠̗̇̽̈́͐̂ͪ̂̌͗̋̍͋̂̈́̈̇͒̈̉͞͝(̷̷̬͈̬̮̤̠̩͈͇̠͑̊ͬ͗̾͂͛̒̄̋̃̒͠Ò̴͔̰̠̫̠̞̜̬͉͓͍̜͊̈̑̽ͩ͢͠ ̷̸̧͖͔͙̞̂̿ͮ̽͊ͫ͋‸̲̼͚̳̀͒ͤ́̑ͩͭ͛͆͌̿̕͠ ̸̶͕͎̳̻̯̥̜ͥ̄̽̊ͪ͐́̋̈ͧ̋̎ͣ͛̾͊ͫͯ̀̕͢Ớͬͣ͆ͯͧͤ̌̌ͩͫ̐ͪ̄ͨͦ͊͢҉̵̛̦͙͍͉̫̯͉̳͓̼̹̬̦̰╬̢̛͕͓̣͉͎̟̰̜̣͍͓̹̭͋͒̐̇́̓ͪ̀ͯ̉̒͌̑͒ͬͯ͊́̚̕͘)̴̖̘̹͓̯̹̯̤͎̻̝͊ͪ͊̑̀̌̈͆ͬ͗͆̚͘
̶̷̨̡̰͈̼̤̟̘͉̬̹̤̯̹̯̣̬̺̲̯ͫͯ̈͗͒͌̊̎ͬ͘(̂̃̈́͐̀̎̉́̓ͮͨ͏̸̬͕͉̭͚̜̫̪̝̮͈̺͔̬͔͓̕͝ͅっ̨̲͕̳̗͐͗ͫ͗̉̈́̐̊̒͋͠λ̨̛̟̬̹̗̲̟͉͉͈̘̲͕̼̼̃ͮͦͥ̊̈̓ͬ͑ͨͭ̓̉͟͠♡̎̀ͣ̊̓̋ͭ͑̇ͫͤ͋͊ͧͬ̈͏̢̦͖͍̲̥̖̞͇͖ͅД̗̘͉̳̭͔͖͕̣̦̱̟͔̹̝̝̠̲ͣ̇͌̒͗ͯ̔ͦͧͩ͗͜♡̶̨̪̰̫̫͇͈̭͔̠̬̦̝̲̝̱̗͊̃͐̏̀̃ͪ̌̈ͫͥ̓͌̇ͥ͐̚͢͡ͅ)̴̨̥̫̩͎̥̮͓͚̘̜̪͍ͥ̃̓̉̑ͮ͊̋̇̆̎̚͟͞ͅっ̸̛͕̫̜̥̿̽̀̚ᕦ̸̷̬̭̭̜͉̂ͤͨ̆̽ͫͥ̇ͩ͐ͫ͌̐̌͝͡(̴̛̲͖̩͖̦̲̳͚̯̰̜̟͖ͧ̒̌̀͑͛͑̎̑ͦͩͨͧ̿̆͟͞`͓̦̝̘̗̗̰̥̩͉͉̣͖̲͕̻̣̞ͫͤ͐ͦ̆͗ͨͩͬ̍̿̉́͘ಠͩ͂̈́͡͏̶̼̪̩̺̟̰͇̯̼͈̥̣̗̞̀͡ὠ̢̡̗̜͔̰̮̫̟̪͎̙̯̼̥͚̣͕ͤ̉́ͪͦ́͑́͆ͧ̃ͬ́ͪ̋́̎̚͠ಠ̸̻̦͙͍̞͖̖̠̲̘̗̥̹͓̼͛͐̇̽ͤ̏̂ͫ̊ͮ̃ͨ͐͒͟ͅ)̶͚͉͙̪̱ͣ͒̒͗̉ͨͪ͟͡͝ᕤ̴̸̡̨̗͕̥̮̯̞̤̩̞̤̦̟̜̝̃ͨͧ̊͑͋ͯͫ̿ͬ́̚̚)̙̮̮̫͚̙͙̙̌̾͊ͬͤͬ̏͐̎͛ͯ̀͢ꂚ̶̛̪̝͚̯̫̪̹̻͍̯͖̣̜̜̘͎̮̈̉ͧ̐͗ͨͥ̈́́̂̆ͯͯ̿͊͛͝*̵̍̾ͣ̏̉̉ͪ̍͛ͦ̽ͨ͠҉̺͉̝̺̲̤̟̳̺̗̞̹ᵎ̫̼̳̟̘̮̟̦͚ͪ͊͗͂͑ͬͩ̈́͛̒̿ͤ́ͥ́=̢̨̞̟̻̳͈̪̩̗̳͓͓͉̜̻̍̒ͪ͑͗̌̅͋ͩ͛̆͢͠ ̶̰̱̻̣̝ͩ́̓͋͝ͅ ̡̌ͦ̍ͫ͛ͦ́͡͡͏͓͈̲͈̰̝͇̠ ̰̻̞̪̽́̆ͭͧ͜͜ ̮͓̟̬͔̬̰̯͕̻͙̫͇̫͖͉͌ͫ̃̄ͤ̓͘͟͡ ̷̨̢̥̜̘̥̲̪̻̞̰̠̻̥̣͙͕̲̹̿ͭ̐̾̄͒͌̉͛̋͌ͥ̓̂̌ ̷̜̯̹̻̜̫̭̪̙̹͍̙͉͊ͪ̑ͪ̇ͣͫ̈͌́ ̱̫̮̮̲̯̺͆͐ͨ̐̾̂̽ͩ̒ͧ̄̂ͨ̀̕ ̴̵̵̨̗͖̤̗͔͕̯͉̤̮̻̬̩̫̘̲̹̳͌̾̋ͯ̍̿̂̀͗ͅ ͂͒̀͌͛̈́̈͊͛̽ͣ̄̄̐̿̚͞҉̹͙̮̯͉ ̶̷͙͓͓̟̰͈̫̣̱͇̝̙̤̘̟̏̅̇͗̃ͫͦ̚̚͢͡͝ ̷̡̥̘̰̘̝̃͆̆̄̅͘͝ ̶̡̨̞̺̱͖̌̒͐ͦ͘͝ ̷̛̔ͭ̏ͫͯ̓͒̈́̅ͧ̂ͧ͑ͨ̄̌͂ͤ̅҉̮̮͇͈̗͓̞̻̰͚̬͇̩͙̭̩̭͔́ ̌̓̐ͤͭ͏̴̨͉͓̰̺̟͎̞̠͎̘̤͚͡ͅΨ̷̵̷̛͓̺̙͔̯̯̮̣̫̼́ͦ̔ͥ̄̄̓͋̾̂̄ͣ͐͠_̨̛̛̞̰̖̗͓͍̭̥̮̘̱̘͕͗͒ͥͣ̀ͩͩ̽ͣ̊̄ͧ͌ͥ̆͘͟ͅ(̥̥͍̬̲̣͖̱̟̌̆̊̃̑ͥ́̎̓ͧ͋̊ͮ̆̈̚͡͝ͅỜ̱͍̭̬̼̲̝͓̯̻̬͙ͬ͒͑ͦ̈̃̀̈́̚͝ͅ ̡̢͉̦͍̙̐ͯ̃ͮͤ̈́͌ͥ͌̽ͪ͝‸̧̩̙̹̼̙̠̱̮̦͙̦͖͖̈́́͐̈ͨ̀̊͑̒̈̎̔̔ͣ͒͋̕͡ ̨̧̨͎̦͎̼͚ͤ͋͛ͥͥ͊ͦ͆͛͌͆̍͆ͮ͝ͅÓ̷̷̙͈̗̤͖͙͇͇̗̳̬͙͍̖̥̮ͥͧ͂ͬͪ̑ͩ̄̍ͧ̍ͪ̚╬̸̴̨̍ͦͭͫ̽͗̾͆͟͏̣̮̭̗̦̣̭̗̪͖̖̻̼̭̥ͅ)̴̻͇̟͇̠͛͂̀̿́̏̇ͫͨ̽̉̊̊̍͢ ̢̼̟̯̞̻͈̭̠̬̝̪̗̟̔̎̓̍ͤ̅̒̀̎ͧͩ̎̊̓ͪͩ̔̕͠͡

Don't change these.
Name: Email:
Entire Thread Thread List