Skip to content

Latest commit

 

History

History
33 lines (18 loc) · 627 Bytes

C01.rst

File metadata and controls

33 lines (18 loc) · 627 Bytes

C01 Introduction of Programming

Exercise

1.Print the string "hello world".

2.Use printf function to output 5X5 square which is consisted of + output examples:

+++++

+++++

+++++

+++++

+++++

3.Write a poem and use printf function to print it out.

4.Include header file math.h to realize the function of getting absolute value of a number.

5.Asign two integer variables a and b via the keyboard. Calculate their sum and then output the result on the screen. For example:

input: 2 5

output: 7