C programming session 03

1,330
-1

Published on

Published in: Education, Sports, Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,330
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
60
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • Begin the session by explaining the objectives of the session.
  • C programming session 03

    1. 1. <ul><li>In this session, you will do the practice questions of Chapter 1 and Chapter 2. </li></ul>Objectives
    2. 2. <ul><li>Write a function to accept a character and display it 40 times. </li></ul><ul><li>Write a function that accepts a number from 0 to 9, along with a string. The string should then be displayed the number of times specified. </li></ul>Chapter 1
    3. 3. <ul><li>1. Write a for loop, which will produce the following output (Hint: use two nested for loops): </li></ul><ul><li>1 </li></ul><ul><li>22 </li></ul><ul><li>333 </li></ul><ul><li>4444 </li></ul><ul><li>55555 </li></ul><ul><li>Create a C program, which calculates the triangular number of the user’s request, read from the keyboard using scanf(). A triangular number is the sum of the preceding numbers, so the triangular number 7 has the value of 7+6+5+4+3+2+1 (same as a factorial in mathematics, for example, factorial of 7 ---- !7). </li></ul>Chapter 2
    4. 4. <ul><li>Create a C program to check whether the number entered by user is even or odd. </li></ul>Chapter 2
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×