Scroll to see replies
main = print results
where
results = fibonacci series
where
series = [1 .. 10]
fib 0 = 0
fib 1 = 1
fib n = (fib (n-1)) + (fib (n-2))
fibonacci [ ] = []
fibonacci (a:b) = (fib a)fibonacci b)
main = print results
where
results = fibonacci series
where
series = [1 .. 10]
fib 0 = 0
fib 1 = 1
fib n = (fib (n-1)) + (fib (n-2))
fibonacci [ ] = []
fibonacci (a:b) = (fib a)fibonacci b)
#include <cstdio> //C standard input output tools
int main()
{
int num; //"num" is an integer
for (num=1; num<=10; ++num) //start "num" at 1 and increase it (1<=num<=10)
{
printf("%d\n",num); //for each value write num in %decimal and go to a \new line
}
}
#include <cstdio> //C standard input output tools
int main()
{
int num; //"num" is an integer
for (num=1; num<=10; ++num) //start "num" at 1 and increase it (1<=num<=10)
{
printf("%d\n",num); //for each value write num in %decimal and go to a \new line
}
}
Spoiler
Last reply 1 week ago
Hello .. I am looking for computer science program BSc/BEng 2024 entryLast reply 3 weeks ago
What A-Levels should i do if i wanna do a Bsc in Computer ScienceLast reply 4 weeks ago
Correlation between performance in UKMT and performance in TMUA/STEP?Last reply 4 weeks ago
Do top universities allow just 3 A levels including Further Maths?Last reply 1 week ago
Hello .. I am looking for computer science program BSc/BEng 2024 entryLast reply 3 weeks ago
What A-Levels should i do if i wanna do a Bsc in Computer ScienceLast reply 4 weeks ago
Correlation between performance in UKMT and performance in TMUA/STEP?Last reply 4 weeks ago
Do top universities allow just 3 A levels including Further Maths?