/*
   This program shows how the values of variables are affected by
   assignment statements and while loops.
*/

#include <stdio.h>

main()
{
  /*  Declaration Statements  */
  short ls, lt, m;

  printf("C41.C -> Program to demonstrate how variables are affected\n");
  printf("by assignment statements in loops.\n");

  /*  Initializing variables  */
  ls = 0;
  lt = 0;
  m = 1;

  /*  Assignment Statements  */

  while (m <= 10) {
    ls++;
    lt += m;
    printf("ls = %d,m = %d,lt =  %d\n", ls, m, lt);
    m += 2;
  }

   /*  Print last results  */
   printf("ls = %d,m = %d,lt =  %d\n", ls, m, lt);

  return(0);
}
/*  End of Program C41  */