COMPUTER PROGRAMMING ASSIGNMENT
Write a program to check whether the character is vowel or consonant?
#include<stdio.h>
#include<conio.h>
int main()
char ch;
printf("Enter a Character \n");
scanf("%c", &ch);
if(ch=='A'||ch=='E'||ch=='I'||ch=='O'||ch=='U')
printf("entered character is a vowel");
else if(ch=='a'||ch=='e'||ch=='i'||ch=='o'||ch=='u')
printf("entered character is a vowel");
else
printf("entered character is a consonant");
getch();
return 0;
OUTPUT:-
Create a C program to convert specified days into years, weeks and days.
#include<stdio.h>
#include<conio.h>
int main()
int d, years, weeks, days;
printf("Enter the number of days \n");
scanf("%d",&d);
years=d/365;
weeks=(d%365)/7;
days=(d%365)%7;
printf("%d days are equal to %d years, %d weeks and %d days \n",d,years,weeks,days);
getch();
return 0;
OUTPUT:-
Create a program in C to display the multiplication table of a given integer.
#include <stdio.h>
#include <conio.h>
int main()
int i,s,prod;
printf("Enter an integer whose table is to be printed - ");
scanf("%d",&i);
for(s=1;s<=10;s++)
prod=i*s;
printf("\n %d * %d = %d",i,s,prod);
getch();
return 0;
OUTPUT:-