Answer to Question #279734 in C for Pinky

Question #279734

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


1
Expert's answer
2021-12-15T02:09:19-0500
#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;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS