Write a program to print the given number in words using ladder if.

/* Write a program to print the given number in words using ladder if.*/ 

#include <stdio.h>

void main()

{

    int n;

    printf("Enter the number : ");

    scanf("%d",&n);

    if(n==1)

    {

        printf("One\n");

    }

    else if(n==2)

    {

        printf("Two\n");

    }

    else if(n==3)

    {

        printf("Three\n");

    }

    else

    {

        printf("Outside Range\n");

    }

    getch();

}

Comments

Popular posts from this blog

Write a program to accept numerator and denominator and find the remainder without using modulus (%) operator using do..while loop.