Showing posts with label given. Show all posts
Showing posts with label given. Show all posts

Wednesday, February 11, 2015

C program to print table of a given number


#include<stdio.h>
#include<conio.h>

void main()
{
int i,n;
clrscr(); //to clear the screen

printf("Enter any number:");
scanf("%d",&n);
printf("Table of %d is:
",n);


for(i=1;i<=10;++i)
printf("
%d*%d=%d",n,i,n*i);

getch(); //to stop the screen
}
Read more »

C program to check given alphabate is vowel or not using switch case


C program to check given alphabate is vowel or not using switch case

#include<stdio.h>
#include<conio.h>

void main()
{
char ch;
clrscr();
printf("Enter an alphabate:");
scanf("%c",&ch);

switch(ch)
{
case a:
case A:
case e:
case E:
case i:
case I:
case o:
case O:
case u:
case U:
printf("The alphabate is vowel");
break;
default: printf("The alphabate is not vowel");
}

getch();
}
Read more »