Hey guys I have this program that doesn't compile
Code:
#include <stdio.h>
typedef
struct{
double price;
double tax;
}Book;
double findTotal(Book cartoon);
void main(void)
{
Book comics = {0.0, 0.0};
double total = 0.0;
readdata(comics.price, comics.tax);
total= findTotal(comics);
puts(total);
}
double findTotal(Book cartoon)
{
double total;
total= cartoon.price+cartoon.tax;
return total;
This is the error it gives:
Code:
test2.c: In function `main':
test2.c:16: incompatible type for argument 1 of `puts'
test2.c:10: warning: return type of `main' is not `int'
Is their a way to keep the main void still return the value of total to it?
And why is it giving me error for puts?
thanks for any help