Write a c program that reads a number representing the amount of minutes for a call
and calculates and prints the cost of the call
#include <stdio.h>
double calc_cost(int minutes) {
// todo write logic
return 0.0;
}
int main() {
int minutes;
printf("Enter the amount of minutes for a call: ");
scanf("%d", &minutes);
printf("Cost for a call is %f", calc_cost(minutes));
return 0;
}
Comments
Leave a comment