Bài tập

01

Write function add 2 numbers type float then return result float type

02

Write absolute function with one number parameter.

if num < 0 then Abs(num) = - num else Abs(num) = num

03

Given a serie of integer numbers from 1 to N, write a function that sum all numbers in this serie sum = 1 + 2 + 3 + .... + N

04

Given a positive integer N, print serie of Fibonanci number 1, 2, 3, 5, 8, 13, ..., N A[i] = A[i-1] + A[i-2]

05

Write a reverse function that reverse all characters in a string that is read from terminal console

reverse("Hello World") => "dlroW olleH"

06

Find all prime numbers from 1 to N Prime number can only divide by 1 and itself.

07

Given array of integer numbers, print to console smallest number and its index in array biggest number and its index in array

08

Given array of integer numbers, find 3 biggest number element then print to console in ascending order

results matching ""

    No results matching ""