#include void main() { int num; printf("\nEnter num \n"); scanf("%d",&num); if(num>0) printf("\nNum is positive\n"); else printf("\nNum is negative\n"); }
/*program to check Entered no is positive or negative*/ #include void main() { int no; printf("\nEnter ano:"); scanf("%d",&no); if(no>0) { printf("\n %d is positive no\n",no);
} if(no<0) { printf("\n%d is a negative no\n",no); } if(no==0) { printf("%d is equalto zero\n",no); } }
/* count of positive negativ zero using for loop*/ #include void main() { int no; int i,c1=0,c2=0,c3=0; for(i=1;i<=5;i++) { printf("\nEnter a no:\n"); scanf("%d",&no); if(no>0) { c1++; } if(no<0) { c2++; } if(no==0) { c3++; }
} printf("\nCount of positive no:%d",c1); printf("\nCount of negative no:%d",c2); printf("\nCount of zero:%d\n",c3);
#include void main() { int num; printf("\nEnter num \n"); scanf("%d",&num); if(num>0) printf("\nNum is positive\n"); else printf("\nNum is negative\n"); }
#include void main() { int a; printf("\n Enter the number"); scanf("%d",&a); if(a>0) { printf("\n number is positive"); } else { printf("\n number is negative"); } }
/*To check No.is positive ,Negative by using multiple if statement,13-july-2016*/ #include void main() { int num; printf("Enter a num"); scanf("%d",&num); if(num>0) { printf("\n\tnum is Positive"); } if(num<0) { printf("\n\tnum is Negative"); } }
// checking either no +ve ,-ve or zero #include void main() { int num,cnt1=0,cnt2=0,cnt3=0; int i=1; for(i=1;i<=5;i++) { printf("\n Enter a number= "); scanf("%d",&num); if(num>0) cnt1++; if(num<0) cnt2++; if(num==0) cnt3++; } printf("\n Positive=%d \n Negative=%d \n Zero=%d \n",cnt1,cnt2,cnt3); }
#include void main() { int num; printf("\n\t enter the num"); scanf("%d",&a); if (num>0) printf("\n\t num is positive"); else printf("\n\t num is nigative"); }
//program to check whether the number positive, negative, zero #include void main() { int i=1, cntt1=0, n, cnt2=0, cnt3=0; for(i=1; i<=5; i++) { printf("\n Enter a number=\t"); scanf("%d",&n); if(n>0) { cnt1++; printf("\n Nos are +ve"); } if(n<0) { cntt2++; printf("\nnos are -ve"); } if(num==0) { cntt3++; rintf("\n No is zero"); } } printf("\n+ve no=%d, -ve no=%d, zero=%d", cntt1, cnt2, cnt3); }
/*program to check Entered no is positive or negative*/ #include void main() { int a; printf("enter two number=="); scanf("%d",&a); if(a>0) { printf("number is positive\n"); } else { printf("number is negative\n"); } }
/*Number is positive or negative*/ #include void main() { int num; printf("\n enter num"); scanf("%d",&num); if(num>0) { printf("\n number is positive"); } else { printf("\n number is negative"); } }
/* Program to count positive,negative and zero from given input*/
ReplyDelete#include
void main()
{
int cnt1=0,cnt2=0,cnt3=0;
int i,no;
printf("Enter the 5 Numbers......");
for(i=1;i<=5;i++)
{
scanf("%d",&no);
if(no>0)
{
cnt1++;
}
if(no<0)
{
cnt2++;
}
if(no==0)
{
cnt3++;
}
}
printf("\nThe POSITIVE numbers=%d",cnt1);
printf("\nThe NEGATIVE numbers=%d",cnt2);
printf("\nThe ZERO's numbers=%d\n",cnt3);
}
#include
ReplyDeletevoid main()
{
int num;
printf("\nEnter num \n");
scanf("%d",&num);
if(num>0)
printf("\nNum is positive\n");
else
printf("\nNum is negative\n");
}
/*program to check Entered no is positive or negative*/
ReplyDelete#include
void main()
{
int no;
printf("\nEnter ano:");
scanf("%d",&no);
if(no>0)
{
printf("\n %d is positive no\n",no);
}
if(no<0)
{
printf("\n%d is a negative no\n",no);
}
if(no==0)
{
printf("%d is equalto zero\n",no);
}
}
/* count of positive negativ zero using for loop*/
ReplyDelete#include
void main()
{
int no;
int i,c1=0,c2=0,c3=0;
for(i=1;i<=5;i++)
{
printf("\nEnter a no:\n");
scanf("%d",&no);
if(no>0)
{
c1++;
}
if(no<0)
{
c2++;
}
if(no==0)
{
c3++;
}
}
printf("\nCount of positive no:%d",c1);
printf("\nCount of negative no:%d",c2);
printf("\nCount of zero:%d\n",c3);
}
sample comment
ReplyDelete/* Program to count positive,negative and zero from given input*/
ReplyDelete#include
void main()
{
int cnt1=0,cnt2=0,cnt3=0;
int i,no;
printf("Enter the 5 Numbers......");
for(i=1;i<=5;i++)
{
scanf("%d",&no);
if(no>0)
{
cnt1++;
}
if(no<0)
{
cnt2++;
}
if(no==0)
{
cnt3++;
}
}
printf("\nThe POSITIVE numbers=%d",cnt1);
printf("\nThe NEGATIVE numbers=%d",cnt2);
printf("\nThe ZERO's numbers=%d\n",cnt3);
}
#include
ReplyDeletevoid main()
{
int num;
printf("\nEnter num \n");
scanf("%d",&num);
if(num>0)
printf("\nNum is positive\n");
else
printf("\nNum is negative\n");
}
#include
ReplyDeletevoid main()
{
int a;
printf("\n\t enter no.");
scanf("%d",&a);
if(a>0)
printf("\n\t positive");
else
printf("\n\t negative");
}
It's a correct program!Check it out!!
ReplyDelete//+ve or -ve
#include
void main()
{
int num;
printf("\n\tEnter a number:");
scanf("%d",&num);
if(num>0)
printf("\n\tPositive number");
else
printf("\n\tNegative number");
}
#include
ReplyDeletevoid main()
{
int a;
printf("\n Enter the number");
scanf("%d",&a);
if(a>0)
{
printf("\n number is positive");
}
else
{
printf("\n number is negative");
}
}
#include
ReplyDeletevoid main()
{
int num;
printf("\n enter the number=");
scanf("%d",&num);
if(num>0)
{
printf("\n positive");
}
else
{
printf("\n negative");
}
}
/*To check No.is positive ,Negative by using multiple if statement,13-july-2016*/
ReplyDelete#include
void main()
{
int num;
printf("Enter a num");
scanf("%d",&num);
if(num>0)
{
printf("\n\tnum is Positive");
}
if(num<0)
{
printf("\n\tnum is Negative");
}
}
// checking either no +ve ,-ve or zero
ReplyDelete#include
void main()
{
int num,cnt1=0,cnt2=0,cnt3=0;
int i=1;
for(i=1;i<=5;i++)
{
printf("\n Enter a number= ");
scanf("%d",&num);
if(num>0)
cnt1++;
if(num<0)
cnt2++;
if(num==0)
cnt3++;
}
printf("\n Positive=%d \n Negative=%d \n Zero=%d \n",cnt1,cnt2,cnt3);
}
/* Program to count positive,negative and zero from given input*/
ReplyDelete#include
void main()
{
int cnt1=0,cnt2=0,cnt3=0;
int i,no;
printf("Enter the 5 Numbers......");
for(i=1;i<=5;i++)
{
scanf("%d",&no);
if(no>0)
{
cnt1++;
}
if(no<0)
{
cnt2++;
}
if(no==0)
{
cnt3++;
}
}
printf("\nThe POSITIVE numbers=%d",cnt1);
printf("\nThe NEGATIVE numbers=%d",cnt2);
printf("\nThe ZERO's numbers=%d\n",cnt3);
}
#include
ReplyDeletevoid main()
{
int num;
printf("\n\t enter a number");
scanf("%d",&num);
if(num>=0)
{
printf("\n\t number is positive");
}
if(num<=0)
{
printf("\n\t number is negative");
}
if(num==0)
{
printf("\n\t number is zero");
}
}
#include
ReplyDeletevoid main()
{
int num;
printf("\n\t enter the num");
scanf("%d",&a);
if (num>0)
printf("\n\t num is positive");
else
printf("\n\t num is nigative");
}
#include
ReplyDeletevoid main()
{
int num;
printf("\n\t Enter number=");
scanf("%d",&num);
if(num>0)
{
printf("\n\t Entered number is positive");
}
else
{
printf("\n\t Entered number is negative");
}
}
This comment has been removed by the author.
ReplyDelete//program to check whether the number positive, negative, zero
ReplyDelete#include
void main()
{
int i=1, cntt1=0, n, cnt2=0, cnt3=0;
for(i=1; i<=5; i++)
{
printf("\n Enter a number=\t");
scanf("%d",&n);
if(n>0)
{
cnt1++;
printf("\n Nos are +ve");
}
if(n<0)
{
cntt2++;
printf("\nnos are -ve");
}
if(num==0)
{
cntt3++;
rintf("\n No is zero");
}
}
printf("\n+ve no=%d, -ve no=%d, zero=%d", cntt1, cnt2, cnt3);
}
#include
ReplyDeletevoid main()
{
int num;
printf("\n\t Enter number=");
scanf("%d",&num);
if(num>0)
{
printf("\n\t Entered number is positive");
}
else
{
printf("\n\t Entered number is negative");
}
}
#include
ReplyDeletevoid main()
{
int a;
printf("\n\t enter no.");
scanf("%d",&a);
if(a>0)
printf("\n\t POSITIVE");
else
printf("\n\t NEGATIVE");
}
#include
ReplyDeletevoid main()
{
int num;
printf("\n\tenter a number");
scanf("%d",&num);
if(num>0)
{
printf("\n\t positive no");
}
if(num<0)
{
printf("\n\t negative no");
}
if(num==0)
{
printf("\n\t zero no");
}
}
#include
ReplyDeletevoid main()
{
int num,c1,c2,c3;
int i;
for(i=0;i<=5;i++);
{
printf("\n\t enter the number");
scanf("%d",&num);
}
if(num>0)
{
c1++;
}
if(num<0)
{
c2++;
}
if(num==0)
{
c3++;
}
printf("\n\t count of positive number=%d",c1);
printf("\n\t count of negative number=%d",c2);
printf("\n\t count of zero=%d",c3);
}
/*program to check Entered no is positive or negative*/
ReplyDelete#include
void main()
{
int a;
printf("enter two number==");
scanf("%d",&a);
if(a>0)
{
printf("number is positive\n");
}
else
{
printf("number is negative\n");
}
}
/*Number is positive or negative*/
ReplyDelete#include
void main()
{
int num;
printf("\n enter num");
scanf("%d",&num);
if(num>0)
{
printf("\n number is positive");
}
else
{
printf("\n number is negative");
}
}
#include
ReplyDeletevoid main()
{
int r;
printf("\nEnter a No");
scanf("%d",&r);
if(r>0)
{
printf("\n No is positive");
}
else
{
printf("\n No is negative");
}
}
#include
ReplyDeletevoid main()
{
int num;
printf("Enter the number");
scanf("%d",&num);
if(num==0)
{
printf("Number is zero");
}
else
if(num<0)
{
printf("Number is negative");
}
else
if(num>0)
{
printf("Number is positive");
}
}
/* Check entered no is Positive or Negative*/
ReplyDelete#include
void main()
{
int a;
printf("\nEnter a no:\n");
scanf("%d",&a);
if(a>0)
{
printf("\nPositive No");
}
else
{
printf("\nNegative No");
}
}