I am trying to write a program in C to get the percent of even numbers in an array. I am thinking of writing it using int datatype. But some one mentioned to me using double will be easier. I don't understand that. Can anyone guide me with it?
What does double datatype return? Can the return statement be given as return (double)? What will that give? Can double convert a real number to a percent? Eg: 0.5 to 50.0