A PHP Error was encountered

Severity: 8192

Message: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated

Filename: libraries/Filtered_db.php

Line Number: 23

C program to print Table of an Integer Number using User Define Function
Q:

C program to print Table of an Integer Number using User Define Function

0

C program to print Table of an Integer Number using User Define Function

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

C program to print Table of an Integer Number using User Define Function

/*  
C program to print Table of an Integer Number 
using User Define Functions.
*/

#include <stdio.h>

/*function declaration*/
void printTable(int);

int main()
{
    int number;

    printf("Enter an integer number: ");
    scanf("%d", &number);

    printf("Table of %d is:\n", number);
    printTable(number);

    return 0;
}

/* function definition...
 * Function     :   printTable
 * Argumenets   :   int- to pass number for table
 * Return Type  :   void
*/
void printTable(int num)
{
    int i;

    for (i = 1; i <= 10; i++)
        printf("%5d\n", (num * i));
}

Output:

    Enter an integer number: 123
    Table of 123 is:
      123
      246
      369
      492
      615
      738
      861
      984
     1107
     1230

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

This question belongs to these collections

Similar questions


need a help?


find thousands of online teachers now