#include<stdio.h>
#include<conio.h>
int grams(int); // function prototype
int main()
{
int kg,gm;
printf("Enter the weight in kilogram: ");
scanf("%d",&kg);
gm=grams(kg);
printf("%d Kilograms = %d Grams\n", kg,gm);
getch();
}
int grams(int weight) //function defination
{
return weight*1000;
}
#include<conio.h>
int grams(int); // function prototype
int main()
{
int kg,gm;
printf("Enter the weight in kilogram: ");
scanf("%d",&kg);
gm=grams(kg);
printf("%d Kilograms = %d Grams\n", kg,gm);
getch();
}
int grams(int weight) //function defination
{
return weight*1000;
}