"); scanf("%lf", &miles); /* Convert the distance to kilometers. */ kms = KMS_PER_MILE * miles; /* Display the distance in kilometers. */ printf("That equals %f kilometers.\n", kms); return (0); } Memory Stack"> "); scanf("%lf", &miles); /* Convert the distance to kilometers. */ kms = KMS_PER_MILE * miles; /* Display the distance in kilometers. */ printf("That equals %f kilometers.\n", kms); return (0); } Memory Stack">

Presentation is loading. Please wait.

Presentation is loading. Please wait.

Compiled and ready to run Memory Stack /*

Similar presentations


Presentation on theme: "Compiled and ready to run Memory Stack /*"— Presentation transcript:

1 Compiled and ready to run Memory Stack /*
* Converts distance in miles to kilometers. */ #include <stdio.h> /* printf, scanf definitions */ #define KMS_PER_MILE /* conversion constant*/ int main(void) { double miles, /* input - distance in miles. */ kms; /* output - distance in kilometers */ /* Get the distance in miles. */ printf("Enter the distance in miles> "); scanf("%lf", &miles); /* Convert the distance to kilometers. */ kms = KMS_PER_MILE * miles; /* Display the distance in kilometers. */ printf("That equals %f kilometers.\n", kms); return (0); } Memory Stack Compiled and ready to run

2 → Memory Stack /* * Converts distance in miles to kilometers. */
#include <stdio.h> /* printf, scanf definitions */ #define KMS_PER_MILE /* conversion constant*/ int main(void) { double miles, /* input - distance in miles. */ kms; /* output - distance in kilometers */ /* Get the distance in miles. */ printf("Enter the distance in miles> "); scanf("%lf", &miles); /* Convert the distance to kilometers. */ kms = KMS_PER_MILE * miles; /* Display the distance in kilometers. */ printf("That equals %f kilometers.\n", kms); return (0); } Memory Stack

3 → Memory Stack /* * Converts distance in miles to kilometers. */
#include <stdio.h> /* printf, scanf definitions */ #define KMS_PER_MILE /* conversion constant*/ int main(void) { double miles, /* input - distance in miles. */ kms; /* output - distance in kilometers */ /* Get the distance in miles. */ printf("Enter the distance in miles> "); scanf("%lf", &miles); /* Convert the distance to kilometers. */ kms = KMS_PER_MILE * miles; /* Display the distance in kilometers. */ printf("That equals %f kilometers.\n", kms); return (0); } Memory Stack

4 → Memory Stack 1.609 /* * Converts distance in miles to kilometers. */
#include <stdio.h> /* printf, scanf definitions */ #define KMS_PER_MILE /* conversion constant*/ int main(void) { double miles, /* input - distance in miles. */ kms; /* output - distance in kilometers */ /* Get the distance in miles. */ printf("Enter the distance in miles> "); scanf("%lf", &miles); /* Convert the distance to kilometers. */ kms = KMS_PER_MILE * miles; /* Display the distance in kilometers. */ printf("That equals %f kilometers.\n", kms); return (0); } Memory Stack KMS_PER_MILE 1.609

5 → Memory Stack 1.609 /* * Converts distance in miles to kilometers. */
#include <stdio.h> /* printf, scanf definitions */ #define KMS_PER_MILE /* conversion constant*/ int main(void) { double miles, /* input - distance in miles. */ kms; /* output - distance in kilometers */ /* Get the distance in miles. */ printf("Enter the distance in miles> "); scanf("%lf", &miles); /* Convert the distance to kilometers. */ kms = KMS_PER_MILE * miles; /* Display the distance in kilometers. */ printf("That equals %f kilometers.\n", kms); return (0); } Memory Stack KMS_PER_MILE 1.609

6 → Memory Stack 1.609 junk junk miles kms /*
* Converts distance in miles to kilometers. */ #include <stdio.h> /* printf, scanf definitions */ #define KMS_PER_MILE /* conversion constant*/ int main(void) { double miles, /* input - distance in miles. */ kms; /* output - distance in kilometers */ /* Get the distance in miles. */ printf("Enter the distance in miles> "); scanf("%lf", &miles); /* Convert the distance to kilometers. */ kms = KMS_PER_MILE * miles; /* Display the distance in kilometers. */ printf("That equals %f kilometers.\n", kms); return (0); } Memory Stack KMS_PER_MILE 1.609 miles junk kms junk

7 → Memory Stack 1.609 junk junk miles kms /*
* Converts distance in miles to kilometers. */ #include <stdio.h> /* printf, scanf definitions */ #define KMS_PER_MILE /* conversion constant*/ int main(void) { double miles, /* input - distance in miles. */ kms; /* output - distance in kilometers */ /* Get the distance in miles. */ printf("Enter the distance in miles> "); scanf("%lf", &miles); /* Convert the distance to kilometers. */ kms = KMS_PER_MILE * miles; /* Display the distance in kilometers. */ printf("That equals %f kilometers.\n", kms); return (0); } Memory Stack KMS_PER_MILE 1.609 miles junk kms junk

8 → Memory Stack 1.609 junk junk miles kms /*
* Converts distance in miles to kilometers. */ #include <stdio.h> /* printf, scanf definitions */ #define KMS_PER_MILE /* conversion constant*/ int main(void) { double miles, /* input - distance in miles. */ kms; /* output - distance in kilometers */ /* Get the distance in miles. */ printf("Enter the distance in miles> "); scanf("%lf", &miles); /* Convert the distance to kilometers. */ kms = KMS_PER_MILE * miles; /* Display the distance in kilometers. */ printf("That equals %f kilometers.\n", kms); return (0); } Memory Stack KMS_PER_MILE 1.609 miles junk kms junk

9 → Memory Stack 1.609 125.0 junk miles kms /*
* Converts distance in miles to kilometers. */ #include <stdio.h> /* printf, scanf definitions */ #define KMS_PER_MILE /* conversion constant*/ int main(void) { double miles, /* input - distance in miles. */ kms; /* output - distance in kilometers */ /* Get the distance in miles. */ printf("Enter the distance in miles> "); scanf("%lf", &miles); /* Convert the distance to kilometers. */ kms = KMS_PER_MILE * miles; /* Display the distance in kilometers. */ printf("That equals %f kilometers.\n", kms); return (0); } Memory Stack KMS_PER_MILE 1.609 miles 125.0 kms junk

10 → Memory Stack 1.609 125.0 junk miles kms /*
* Converts distance in miles to kilometers. */ #include <stdio.h> /* printf, scanf definitions */ #define KMS_PER_MILE /* conversion constant*/ int main(void) { double miles, /* input - distance in miles. */ kms; /* output - distance in kilometers */ /* Get the distance in miles. */ printf("Enter the distance in miles> "); scanf("%lf", &miles); /* Convert the distance to kilometers. */ kms = KMS_PER_MILE * miles; /* Display the distance in kilometers. */ printf("That equals %f kilometers.\n", kms); return (0); } Memory Stack KMS_PER_MILE 1.609 miles 125.0 kms junk

11 → Memory Stack 1.609 125.0 201.125 miles kms /*
* Converts distance in miles to kilometers. */ #include <stdio.h> /* printf, scanf definitions */ #define KMS_PER_MILE /* conversion constant*/ int main(void) { double miles, /* input - distance in miles. */ kms; /* output - distance in kilometers */ /* Get the distance in miles. */ printf("Enter the distance in miles> "); scanf("%lf", &miles); /* Convert the distance to kilometers. */ kms = KMS_PER_MILE * miles; /* Display the distance in kilometers. */ printf("That equals %f kilometers.\n", kms); return (0); } Memory Stack KMS_PER_MILE 1.609 miles 125.0 kms

12 → Memory Stack 1.609 125.0 201.125 miles kms /*
* Converts distance in miles to kilometers. */ #include <stdio.h> /* printf, scanf definitions */ #define KMS_PER_MILE /* conversion constant*/ int main(void) { double miles, /* input - distance in miles. */ kms; /* output - distance in kilometers */ /* Get the distance in miles. */ printf("Enter the distance in miles> "); scanf("%lf", &miles); /* Convert the distance to kilometers. */ kms = KMS_PER_MILE * miles; /* Display the distance in kilometers. */ printf("That equals %f kilometers.\n", kms); return (0); } Memory Stack KMS_PER_MILE 1.609 miles 125.0 kms

13 → Memory Stack 1.609 125.0 201.125 miles kms /*
* Converts distance in miles to kilometers. */ #include <stdio.h> /* printf, scanf definitions */ #define KMS_PER_MILE /* conversion constant*/ int main(void) { double miles, /* input - distance in miles. */ kms; /* output - distance in kilometers */ /* Get the distance in miles. */ printf("Enter the distance in miles> "); scanf("%lf", &miles); /* Convert the distance to kilometers. */ kms = KMS_PER_MILE * miles; /* Display the distance in kilometers. */ printf("That equals %f kilometers.\n", kms); return (0); } Memory Stack KMS_PER_MILE 1.609 miles 125.0 kms

14 → Memory Stack 1.609 125.0 201.125 miles kms /*
* Converts distance in miles to kilometers. */ #include <stdio.h> /* printf, scanf definitions */ #define KMS_PER_MILE /* conversion constant*/ int main(void) { double miles, /* input - distance in miles. */ kms; /* output - distance in kilometers */ /* Get the distance in miles. */ printf("Enter the distance in miles> "); scanf("%lf", &miles); /* Convert the distance to kilometers. */ kms = KMS_PER_MILE * miles; /* Display the distance in kilometers. */ printf("That equals %f kilometers.\n", kms); return (0); } Memory Stack KMS_PER_MILE 1.609 miles 125.0 kms

15 → Memory Stack /* * Converts distance in miles to kilometers. */
#include <stdio.h> /* printf, scanf definitions */ #define KMS_PER_MILE /* conversion constant*/ int main(void) { double miles, /* input - distance in miles. */ kms; /* output - distance in kilometers */ /* Get the distance in miles. */ printf("Enter the distance in miles> "); scanf("%lf", &miles); /* Convert the distance to kilometers. */ kms = KMS_PER_MILE * miles; /* Display the distance in kilometers. */ printf("That equals %f kilometers.\n", kms); return (0); } Memory Stack


Download ppt "Compiled and ready to run Memory Stack /*"

Similar presentations


Ads by Google