26. Program to Calculate Sum of Natural Numbers from 25 to 39


Comments

  1. //Sum of natural number
    #include
    #include
    void main()
    {
    int i,sum=0;
    clrscr();

    printf("\nSum of Natural number from 25 to 39");
    for(i=25;i<=39;i++)
    {

    sum+=i;
    printf("\n\tsum = \t%d",sum);

    }
    getch();
    }

    ReplyDelete

Post a Comment