C PROGRAM THAT DISPLAY SERIES OF NUMBER FROM N TO M ACCEPT THE VALUE OF N AND M FROM KEYBOARD - 6 Players blogs for technology

give us your feedback

People Online

Breaking

ads

Post Top Ad

Thursday, May 16, 2019

C PROGRAM THAT DISPLAY SERIES OF NUMBER FROM N TO M ACCEPT THE VALUE OF N AND M FROM KEYBOARD

#include <stdio.h>
#include <stdlib.h>

int main()
{
    int n,m,i;
    printf("\n\t enter the value of n = ");
    scanf("%d",&n);
    printf("\n\t enter the value of m = ");
    scanf("%d",&m);
    printf("\n\t the number between %d and %d are \n\t",n,m);
    for(i=n;i<=m;i+=1){

        printf("\n\t %d",i);
    }

    return 0;
}

OUTPUT IS
let say the value of n is 0 and the value of m is 10

 enter the value of n =  0
 enter the value of m = 10
1
2
3
4
5
6
7
8
9
10

follow us on our Facebook channel

No comments:

Post a Comment

ads1

Post Top Ad