Write a function which receives a float and int from main() finds the product of these two and returns the product which is printed through main.

Share

source code

#include <stdio.h>
#include <conio.h>
float mul(int ,float );
int main(){
   
    printf("Enter the one int and one float number: ");
    int x;
    float y;
    scanf("%d %f",&x,&y);
    float c= mul(x,y);
   printf("%f",c);
   return 0;
}
float mul(int a,float b){
    float result=a*b;
    return result;
}

output

Share
%d bloggers like this: