Convert Weight Gram to Kg
#include<stdio.h>
#include<conio.h>
void main()
{
int weight;
int kg,gm;
clrscr();
printf(" Total Weight in Gram :");
scanf("%d",&weight);
kg=weight/1000;
gm=weight%1000;
printf("\n %d kg and %d gm",kg,gm);
getch();
}