includety
DESCRIPTION
wywrtTRANSCRIPT
Question # 01:
#include<stdio.h>
#include<conio.h>
void main()
{
intvowl=0;
charch;
clrscr();
while((ch=getche())!='\r')
if( (ch=='a') || (ch=='A') || (ch=='e') || (ch=='E') || (ch=='i') || (ch=='I') || (ch=='o') || (ch=='O') || (ch=='u') || (ch=='U'))
vowl++;
printf("\n Number of Vowels are %d",vowl);
getch();
}
Question # 02:
#include<stdio.h>
#include<conio.h>
void main()
{
intx,y,c=0,sum=0,tn=0;
floatavg=0;
clrscr();
for(x=2;x<=100;x++)
{
for(y=x;y>=2;y--)
{
if(x%y==0)
c++; }
if(c==1)
{
printf(" %d",x);
tn++;
sum=sum+x;
}
c=0;
}
avg=sum/tn;
printf("\n The average of these prime numbe is: %f",avg);
getch();}
Question # 03:
#include<stdio.h>
#include<conio.h>
void main()
if(ch==’S’)
continue;
printf(“%c”,ch1);
}
printf(“\n”);
m=m-4;
}
getch();
}
DATE: 23-01-2015