Public feed #379555

Someone

public text v1 · immutable
Raw Edit
·published 2007-03-03 10:29 UTC
rendered paste body
   /*var4.c - Program 2.4 */

   #include <stdio.h> 

   int main(void) {

       int age; /* User's age in years */
       float hourly_wage; /* User's
           hourly age in dollars. */
       char gender; /* M or F */
  /* Create a character string and assign it a value. */
  char name[] = "Franny Isabel";

  /* Set the values. */

       age = 40;
       hourly_wage = 3.35;
       gender ='F';

       /* Print the variable values. */
       printf("You are %d years old.\n",
       	   age);
       
       printf("Your hourly wage is $%0.2f. this translates into approximately $%0.2f per year.\n", hourly_wage,
       hourly_wage * 40 * 52);
       printf("Your name is %s.\n", name);

       age = 40;
       hourly_wage = 3.35;
       gender ='F';

       /* Print the variable values. */
       printf("You are %d years old.\n",
       	   age);
       
       printf("Your hourly wage is $%0.2f. this translates into approximately $%0.2f per year.\n", hourly_wage,
       hourly_wage * 40 * 52);
         printf("Your gender was listed as %c.\n", gender );

         getchar(); /* Pause for User to press Return or Enter.*/

      return 0;

      }