You should learn to use functions. A function is called from main and it can be passed arguements. The function requires a definition and should have a prototype.
Although just a useless function, this is a demonstration of the syntax. This function passes the arguements num and price by value, therefore copies of these arguements are created an placed in the function parameters of the same name.
//return type - function name - parameters
void MyFunction(int,double); //prototype
scanf("%d %lf", &num, &price);
//num and price are arguements to the function call
MyFunction(num,price); //function call
void MyFunction(int num, double price)
//num and price are the function parameters
double charge = num * price;
printf("Charge is: ",charge);