Ceng198

Introduction to Computer Programming

Lab#5 – Introduction to C Programming

Part I.

Write a program that asks for an integer and then prints all the integers from (and including) that value up to (and including) a value larger by 10. (That is, if the input is 5, the output runs from 5 to 15.) Be sure to separate each output value by a space or tab or new line.

Sample run:

Enter an integer--> 5

5 6 7 8 9 10 11 12 13 14 15

Part II.

Write a function that takes three arguments: a character and two integers. The character is to be printed. The first integer specifies the number of times that the character is to be printed on a line, and the second integer specifies the number of lines that are to be printed. Write a program that makes use of this function.