Includety
-
Upload
asif-khan-niazi -
Category
Documents
-
view
212 -
download
0
description
Transcript of Includety
![Page 1: Includety](https://reader036.fdocuments.us/reader036/viewer/2022072009/55cf922e550346f57b945937/html5/thumbnails/1.jpg)
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();
![Page 2: Includety](https://reader036.fdocuments.us/reader036/viewer/2022072009/55cf922e550346f57b945937/html5/thumbnails/2.jpg)
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()
![Page 3: Includety](https://reader036.fdocuments.us/reader036/viewer/2022072009/55cf922e550346f57b945937/html5/thumbnails/3.jpg)
if(ch==’S’)
continue;
printf(“%c”,ch1);
}
printf(“\n”);
m=m-4;
}
getch();
}
![Page 4: Includety](https://reader036.fdocuments.us/reader036/viewer/2022072009/55cf922e550346f57b945937/html5/thumbnails/4.jpg)
DATE: 23-01-2015