The funA()
function stores a value entered by the user.
The funB()
function will allow the user to choose an option.
My difficulty is in the third function: I need to create a function that multiplies the value stored in the first function by the value generated by the user's choice. I do not know how to call these functions within function C and use the stored values.
#include <stdio.h>
#include <stdlib.h>
void funA(){
int numA;
scanf("%d", &numA);
}
void funB(){
int numB;
float x;
printf("Escolha um valor:\n");
printf("1 - Alto\n");
printf("2 - Medio\n");
printf("3 - Baixo\n");
scanf("%d", &numB);
if(numB == 1){x = 100;}
if(numB == 2){x = 50;}
if(numB == 3){x = 10;}
}
void funC(){
//?????
}