Program in C to print numbers from 1-50 which are divided by 7

Write a program in C to print numbers from 1-50 which are divided by 7

#include <stdio.h>

void main ()
{
          int a;
          clrscr ();
          a=1;
          while (a<=50)
          {
                   if (a%7==0)
                             printf ("%d\n",a);
                   a++;
          }
          getch ();
}


Post a Comment