2. Write a program with two functions. In main ask for a number. Pass this to the first function and print the value. In the first function ask for a character. Pass the first number and the character to the second function. In the second function print the number entered in main and the character entered in the first function. Back in main print "That's the end of this lab".
Code:
Can you Please help to send from one function to another? Please!Code:#include<stdio.h>
void fun (float); /* the FUNCTION PROTOTYPE */
main()
{
float a;
printf("Please enter a number: "); /* Program in MAIN */
scanf("%f",&a);
fun(a);
getch();
}
void fun (float x) /* Function Header/Definition – NO semicolon */
{
char q;
printf("The number you entered is %4.2f.",x);
printf("\n\nPlease enter a character: ");
scanf("%c",q);
return(0); /* value of product is returned to the main function */
}
Thank You So Much!