Groups
Sign in
Groups
Learn C Language
Conversations
About
Send feedback
Help
Q#1_LAB_7
2 views
Skip to first unread message
MUNAM NAUMAN
unread,
Dec 26, 2011, 12:33:29 AM
12/26/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Learn C Language
#include<stdio.h>
#include<conio.h>
#include<stdlib.h>
int main (void)
{
int a,s,even=0,odd=0,zeros=0;
clrscr();
printf("Enter 30 Integers\n");
s=1;
while(s<=30){
scanf("%d",&a);
s++;
if(a!=0&&a%2==0){
++even;
}
else if(a%2!=0){
++odd;
}
else{
++zeros;
}
}
printf("\nEVEN = %d",even);
printf("\nODD = %d",odd);
printf("\nZEROS = %d",zeros);
getch();
return 0;
}
MUNIB UL HASSAN
unread,
Dec 27, 2011, 8:49:30 AM
12/27/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Learn C Language
#include<stdio.h>
#include<conio.h>
#include<stdlib.h>
int main (void)
{
int q,w,even=0,odd=0,zeros=0;
clrscr();
printf("Enter 30 Integers\n");
w=1;
while(w<=30){
scanf("%d",&q);
w++;
if(q!=0&&q%2==0){
++even;
}
else if(q%2!=0){
MUNAM NAUMAN
unread,
Dec 27, 2011, 8:52:56 AM
12/27/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Learn C Language
#include<stdio.h>
#include<conio.h>
#include<stdlib.h>
int main (void)
{
int a,s,even=0,odd=0,zeros=0;
clrscr();
printf("Enter 30 Integers\n");
s=1;
while(s<=30){
scanf("%d",&a);
s++;
if(a!=0&&a%2==0){
++even;
}
else if(a%2!=0){
WAQAR ISHAQ
unread,
Dec 27, 2011, 8:58:37 AM
12/27/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Learn C Language
MUHAMMAD FARHAN KHALID
unread,
Dec 27, 2011, 9:07:48 AM
12/27/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Learn C Language
USMAN ARSHAD
unread,
Dec 27, 2011, 9:12:47 AM
12/27/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Learn C Language
KASWAR ABBAS
unread,
Dec 27, 2011, 9:01:13 AM
12/27/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Learn C Language
Reply all
Reply to author
Forward
0 new messages