Question

# Use C code please! Write the function definition for a function called FindQuo that takes one...

Use C code please!

Write the function definition for a function called FindQuo that takes one argument of type double (arg1 ) and returns a double.  The purpose of the function is to calculate the quotient of arg1 divided by a double (num) that will be entered by the user.

Inside the function declare ask and get a double value from the user called num

Use a loop (while or do/while) to ensure that the user does not enter a 0.0.

You do not want to divide by 0.

• if both arg1 and num are both positive values, print the message "the result is positive"
• if both arg1 and num are both negative values, print the message "the result is positive"
• If arg1 is negative and num is positive, print the message "the result is negative"
• If arg1 is positive and num is negative, print the message "the result is negative"

Divide arg1 by num and return the result

```#include<stdio.h>

double FindQuo(double arg1){
double num;
printf("Enter value for num: ");
scanf("%lf",&num);
while(num==0.0){
printf("Enter value for num: ");
scanf("%lf",&num);
}
if(arg1>=0 && num>0){
printf("the result is positive\n");
}
if(arg1<0 && num<0){
printf("the result is positive\n");
}
if(arg1<0 && num>0){
printf("the result is negative\n");
}
if(arg1>=0 && num<0){
printf("the result is negative\n");
}
return arg1/num;
}

int main(){
printf("%lf",FindQuo(5));
return 0;
}```

#### Earn Coins

Coins can be redeemed for fabulous gifts.