Sup Sup Forums

sup Sup Forums

You have five minutes to write a program that counts from 1 to 10.

GO!

1
2
3
4
5
6
7
8
9
10

program fagop
implicit none
integer :: j1
do j1=1,10
write(6,*) j1
enddo
end program

for (my $i = 0; $i < 11;$i++){
say $i;
}

```C++
#include
#include
#include
int main() {
//BUG fagottnessOfOP may overflow, consider different variable type
for( long long fagottnessOfOP=1; fagottnessOfOP

echo {1..10}
Got it done barely in time!!!

R
1:10

1
2
3
4
5
6
7
8
9 10

test

#include

char *counting[10] = {"One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine", "Ten"};

int main()
{
for(int i = 0; i < 10; i++)
std::cout

I am an professional programmer and I can do it in C

#include

using namespace std;

void main(int argc, char* argv[]) {
int count = 0;

for (i = 10; i >= 0; i++) {
/* secret trick ;) */
/* increment inline, much fast */
cout

print 1
print 2
print 3
print 4
print 5
print 6
print 7
print 8
print 9
print 10

I approve of this coding style

>brace expansion
>counting

(range 1 11)

suck my dick

> t. clojurer

echo {1..10}

very nice

import os
import re

def count(upto=10):
cnt = 0
regex = re.compile(b'[\x30-\x39]')
while cnt < upto:
c = os.urandom(1)
if regex.match(c):
j = int(c.decode('ascii'))
if j == cnt:
cnt += 1
print(cnt)

count()

Array.from({ length: 10 }).forEach((_, i) => console.log(i+1));

countToTen();

function countToTen() {
console.log(1);
console.log(2);
console.log(3);
console.log(4);
console.log(5);
console.log(6);
console.log(7);
console.log(8);
console.log(9);
console.log(10);
}


easy

Function 10faggots{
For(faggots=1; faggots

Interesting philosophical question. Can a program truly "count" or is it just pushing bits from one place to another? Is the rote tabulation necessarily "counting" or does the lack of valuation eliminate that as a possibility for a floating abstraction whose legs are forever suspended out of the reach of solid ontological grounding?

No, I do not think I am qualified to write a program that can count. At least... I can't count on it.

>Muh pedantic Chinese room knockoff

>Can a person truly "count" or is it just electrical signals from one part of the brain to another?

begin:
xor eax,eax
inc eax
cmp eax, 10
jge done
jmp begin
done:

console.log("1 2 3 4 5 6 7 8 9 10")

ι10

fuck, still under 5 min tho
xor eax,eax
begin:
inc eax
cmp eax, 10
jge done
jmp begin
done:

Eat my APL.

for(int x = 1; x

+.+.+.+.+.+.+.+.+.+.

Pft. Deconstructionist. Of course a human can count, how can something that doesn't count invent a monetary system for use? That is the very act of compressing value into a mapping onto Integers. And how can counting be anything other than that? Perhaps a computational system or programming can become sophisticated enough to interdependently develop an enumerated valuation system for strictly internal purposes, but _I_ certainly am not capable of making such a program.

10 int c = 1;
20 while (c

in ruby
puts *1..10

#define print1to10(fuck) for(auto U = 1; U

oops, you can just do
p *1..10

Doesn't count to ten, faggot

(iota 10 1)

scheme

git gud

Google certified Android developer

HAI
CAN HAS STDIO?
VISIBLE "1 2 3 4 5 6 7 8 9 10"
KTHXBYE

Delet

print(*range(1, 11))

tf is this

0. 01.10. 001. 010 etc....


I have a question: why is youtube manipulating my youtube account when i am just a regular dysfunctional user? I make almost 0 videos and they are almost never popular. I dont know a lot about computer science but in some ways i do. Susan woscicki or however that polish shit is spelled. Lest not forget lesk waleska

python 3

print $_."\n" for (1..10)

Op . I have been a youtube google and fb user since almost all of their beginnings. Youtube is removing videos that i watched later and favorited from my own channel. Why and how?

elegant, but unnecessarily long for a Perl prog

...

I answered a phone call and it went str8 to video i tried to fav. Ill let u know if its there. This is 2 weird. Thnx

I had an update yesterday idk i havnt really checked but i am really curious

[io:format(X) || X

mapM_ (putStrLn . show) [1..10]

for i =1
do i 1, 10
i + 1
print(i)
end

U should see the few marijuana plants i am growing. Is this site secure? I feel like the underground x-men. Ive been experiementing with different lights.

you'll be fine

I can figure out all ur dumbasses code im just busy with other things and i choose not to. Its supposed to be your job as my friend to help me and figure out the facts reconcile etc

Oh gawd im so boring get over yourself

>Keep America American
>Peace through superior firepower
$5 says that's one of the ruskie accounts

Its bicamerilism!

range(1,11)
#Don't you wish your language was as elegant as Python?

...

Wait, what do you mean by "count"?

Speak python. I never learned it. I hear afghan (dari) 2 day

To prevent "old accounts" from mattering old favorites are slowly being pruned. Same thing as subscriptions.

>test

How do you count? Binary or hexadecimal?

My father taught me that. He was a machinist and a chemist.

I mean, is printing the values "counting"? Then you should ask me to print the values.

Keep france france keep russia ruskie. Stfu retard we can annihilate you at our choosing. Its always nice to see a fool play its cards

The using namespace only makes it bigger if your only using an std function once, pajeet

What'd u got a ace up ur sleeve? Shut bitch prepare for hell u wont escape

Thats called dictation right look im chinese yellow face. We all look same (jk)

say for (1..10)
Dunno how to make it any shorter. Say implicitly uses $_ if no argument is provided.

O.01.10.001.001.010.011.100.101.011.

mapM_ putStrLn (map show [1..10])


Can I improve this any?

Ur $ cant satisfy my apetite

What?

10 Print "1"
20 Print "2"
30 Print "3"
40 Print "4"
50 Print "6"
60 Print "5"
70 Print "7"
80 Print "8"
90 Print "9"
100 Print "10"

Yes, by not using haskell.

Why 5 minutes? is it to account for Rust users?

For I in {1..10}; do echo $i: done

Does zero count? This is a trick. Good on u op

Print motherfucker!

>You have five minutes to write a program that counts from 1 to 10.
>that counts from 1 to 10.
>1 to 10.

Echo tanger niner ten 4 dumbass

(dotimes (i 10) (print (+ i 1)))

Easy. So fuckin easy. U do it. Count to ten

(labels ((tc (l) (typecase l (null 0) (cons (+ 1 (tc (car l)) (tc (cdr l)))) (t 1)))) (let ((b (let ((c 0)) #1=(lambda () (incf c 1))))) (loop (let ((a (funcall b))) (when (> a (tc '#1#)) (return)) (print a)))))
Look ma, no 10.

ι10

Its easy if you speak the language

Are we finished? My goodness. I have tonate money to 4 chan pretty soon. Fuckin assholes

I don't have time to do this because I have a fizzbuzz due in 6 days.

Please explain...What's the asterisk? New to me in Ruby. I would have done this:

[1..10].each { |n| puts n}

no U do it

puts 1.upto(10)

Not much shorter.... I think it will work though, without the to_a

in C:

void main(){
int i; for (i = 0; i

It's a golfing trick I learnt a while ago, you can also use it as a variadiac argument on your methods, like so:
def show_array(*array)
array.map(&method(:puts))
end
show_array([1,2,3,4,5,6])

or use it to split an array into a head and tail:
head, *tail = [1,2,3,4]

and even join an array without using the ".join" method:
[1,2,3,4]*?\s

Same as:
puts (1..10).to_a