jruzmora HW 1 - Chapter 2 Problem 37 /* Chapter 2 # 37 This...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Sheet1 Page 1 Chapter 2 Problem 37 /* Chapter 2 # 37 This program uses the atomic weight of the elements that make up Glycine to calculate its molecular weight */ /* Preprocessor directives */ #include <stdio.h> #define O 15.9994 #define C 12.011 #define N 14.00674 #define S 32.066 #define H 1.00794 int main(void) { /* Declare and initialize variables */ double weight /* Compute molecular weight of Glycine */ weight = O*2 + C*2 + N*1 + S*0 + H*5 /* Show the molecular weight of Glycine */ printf("molecular weight of Glycine = %.5f \n", weight) /* Exit Program */ getchar () getchar () return 0 } Chapter 2 Problem 39 /* Chapter 2 # 39 This program calculates the molecular weight of an amino acid */ /* Preprocessor directives */ #include <stdio.h> #define O 15.9994 #define C 12.011 #define N 14.00674 #define S 32.066
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Sheet1 Page 2 #define H 1.00794 int main(void) { /* Declare and initialize variables */ int atom_o, atom_c, atom_n, atom_s, atom_h double weight d /* User imput of atoms */ printf("Enter number of oxygen atoms: \n")
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 4

jruzmora HW 1 - Chapter 2 Problem 37 /* Chapter 2 # 37 This...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online