how do i link all these function together in the main funtion so it can run? thank you

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

//

//  main.c

//  Assignment1

//

//  Created by Hassan omer on 15/10/21.

//

 

#include <stdio.h>

# include <stdlib.h>

int input();

int multiples();

int cions();

void display_change();

 

int main() {

 

    int num;

    num = input();

    multiples(num);

    cions();

    display_change();

  

    return 0;

}

 

 

int input(int num)

{

    

    printf("enter 5-95 number\n");

    

    scanf("%d",&num);

    return num;

}

 

int multiples(int num)

{

    int sum5 =0;

   

    if (sum5 %5 != 0 ||sum5<5|| sum5 >95) {

        printf("invaild input %d",sum5);

    }

    cions(sum5);

return sum5;

}

 

int cions(int sum05){

  

    int cent50 = 0;

    int cent20 = 0;

    int cent10 = 0;

    int cent05 = 0;

    

    if (sum05 > 0)

    {

        if (sum05 >= 50){

            sum05 -= 50;

            cent50++;

        }

        else if (sum05 >=20){

            sum05 -= 20;

            cent20++;

        }

        else if (sum05 >= 10){

            sum05 -=10;

            cent10++;

            

        }

        else if (sum05 >= 05){

            sum05 -= 05;

            cent05++;

        }

        else{

            printf("error input");}

        

    }

    return (sum05);

}

 

void display_change(int sum05)

{

    int cent50 = 0;

    int cent20 = 0;

    int cent10 = 0;

    int cent05 = 0;

  

    if (cent50)

        printf("cent %d",cent50);

    if(cent20)

        printf("cent %d",cent20);

    if(cent10)

        printf("cent %d",cent10);

    if(cent05)

        printf("cent %d",cent05);

        

    

    

}

how do i link all these function together in the main funtion so it can run?

thank you

Expert Solution
steps

Step by step

Solved in 3 steps with 3 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY