Pass your marks of CA-1, CA-2, and CA-3, of course, INT102 to the function with header high
(float, float, float). Write a function that should return the highest CA mark
#include <stdio.h>
float high(float m1, float m2, float m3) {
float h;
if (m1 > m2)
h = m1;
else
h = m2;
if (m3 > h)
h = m3;
return h;
}
int main() {
float ca1, ca2, ca3;
ca1 = 50;
ca2 = 65;
ca3 = 60;
printf("The highst CA mark is %.1f\n", high(ca1, ca2, ca3));
return 0;
}
Comments
Leave a comment