/****************************************************************************** This is a good example of a basic calculator you can add more features to with additional functions *******************************************************************************/ #include double additionFunction(double addend1, double addend2); int main() { int choice = -1; double num1 = 0.0; double num2 = 0.0; double answer = 0.0; while (choice != 0) { printf("Welcome to the Robotics Calculator\n"); printf("0. Exit\n"); printf("1. Addition\n"); printf("2. Find Minimum Number\n"); scanf("%d", &choice); switch(choice) { case 0: printf("Thanks for using the Robotics Calculator. See you later!"); break; case 1: printf("Enter your first addend: "); scanf("%lf", &num1); printf("Enter your second addend: "); scanf("%lf", &num2); printf("Your answer is: "); answer = additionFunction(num1, num2); printf("%lf", answer); printf("\n"); break; default: printf("That is not one of your options. Pick again!\n\n"); break; } } return 0; } double additionFunction(double addend1, double addend2) { double sum; return sum = addend1 + addend2; } /*double findMin(double[] listOfNums) { }*/