Advertisement
BHADRA_JAYAKUMAR

Molecular Count

Oct 9th, 2020 (edited)
829
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.25 KB | None | 0 0
  1. #include <stdio.h>
  2. int main()
  3. {
  4.     int c,h,o,glucose,water,soda;
  5.     scanf("%d %d %d",&c,&h,&o);
  6.     soda=((2*o)-h)/4;
  7.     water=(h-2 * c + 2 * soda) / 2;
  8.     glucose=(c -soda) / 6;
  9.     printf("%d %d %d",glucose,water,soda);
  10.     return 0;
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement