Download 컴퓨터의 개념 및 실습 Practice 4 - Intelligent Data Systems Laboratory

yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Document related concepts

Large numbers wikipedia, lookup

Collatz conjecture wikipedia, lookup

Halting problem wikipedia, lookup

Addition wikipedia, lookup

Proofs of Fermat's little theorem wikipedia, lookup

Elementary mathematics wikipedia, lookup

컴퓨터의 개념 및 실습
3월 30일
Intelligent Data Systems Lab.
Department of Computer Science & Engineering
Practice 1
 Write a program to calculate the volume and surface
area of a sphere from its radius, given as input. Here are
some formulas that might be useful:
V = 4/3𝜋𝑟
A = 4𝜋𝑟
컴퓨터의 개념 및 실습
Practice 2
 Two points in a plane are specified using the
coordinates (x1,y1) and (x2,y2). Write a program that
accepts two points and determines the distance
between them.
 Distance =
(𝑥2 − 𝑥1)2 +(𝑦2 − 𝑦1)2
컴퓨터의 개념 및 실습
Practice 3
 Write a program that distinguish whether the input
numbers are integer or not. The program should first
prompt the user for how many numbers are to be
entered. It should then input each of the numbers and
print whether it is an integer number or not.
* Integer does not mean the type of variable in this problem.
For example, the program should consider 3.0 as an integer number.
컴퓨터의 개념 및 실습
Practice 4
 A Fibonacci sequence is a sequence of numbers where
each successive number is the sum of the previous two.
The classic Fibonacci sequence begins: 1, 1, 2, 3, 5, 8,
13, … Write a program that computes the nth Fibonacci
number where n is a value input by the user. For
example, if n = 6, then the result is 8.
컴퓨터의 개념 및 실습