lab2 - int monthage; printf( "Enter the year...

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

View Full Document Right Arrow Icon
Doug Rivas Lab 2 – ME 218 2.1. Run for TA the following code in code warrior: #include <stdio.h> int main(void) { fprintf(stdout, "Hello World, this is CodeWarrior!\n"); return 0; } 2.2 2.3 #include <stdio.h> #include <math.h> int main(void) { int a; int m; float exactage; int currentage;
Background image of page 1

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

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: int monthage; printf( &quot;Enter the year you were born:\n&quot;); scanf(&quot;%d&quot;, &amp;a); printf(&quot;Enter the month you were born:\n&quot;); scanf(&quot;%d&quot;, &amp;m); exactage== ((2007-a)); printf(&quot;Your current age in years is: %f\n&quot;, exactage); return 0; } 2.4...
View Full Document

Page1 / 2

lab2 - int monthage; printf( &amp;amp;quot;Enter the year...

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

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