Date: 2014-07-08 03:43 pm (UTC)
Тут такое дело: люди читают книжки из компьютерной секции в Барнс анд Ноубл, нахватываются ключевых слов, запоминают синтаксис, шаблоны и стандартные рецепты. А программировать при этом не умеют и как устроен компьютер - не знают.

1. Write a program that prints the numbers from 1 to 100.
But for multiples of 3 print “Fizz” instead of the number and for the multiples of 5 print “Buzz”.
For numbers which are multiples of both 3 and 5 print “FizzBuzz”.

2. Write a function that checks if a given string is a palindrome. For example: "abcba" -> True, "abab" -> False, "aa" -> True, "a" -> True.

3. Write a function that takes a string and returns an unsigned integer represented by this string (in binary). For example, "1111" -> 15, "10101" -> 21, "1017" -> error (not binary). Bonus points for handling overflow. Extra bonus points for signed integers.

4. Write a program that takes an integer N and prints the Nth Fibonacci number (1, 1, 2, 3, 5, 8, 13, 21, 34, 55...).
This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

May 2022

S M T W T F S
123 4 5 67
8 9 10 1112 1314
15 161718 192021
22 232425 2627 28
293031    

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jul. 31st, 2025 11:11 am
Powered by Dreamwidth Studios