sign up I login
 advanced
refer a friend - earn nickels!!

Ask & Discuss Questions with Community & Experts

Moderation Team
 90 chars left    advanced
Ask iit jee aieee pet cbse icse state board community Community Discussion Question: WAP in c++ to enter 5 nos and print the no of +ve nos,-venos and zeroes
Forum Index -> Computer Science like the article? email it to a friend.  
Author Message
shubham.dutt (0)

New kid on the Block

Olaaa!! Perrrfect answer. 0  [0 rates]

shubham.dutt's Avatar

total posts: 3    
offline Offline
WAP in c++ to enter 5 nos and print the no of +ve nos,-venos and zeroes
    
GoNik (197)

Blazing goIITian

Olaaa!! Perrrfect answer. 31  [52 rates]

GoNik's Avatar

total posts: 964    
offline Offline
i can giv it in C lang......u can take its logic and write it in C++.... ok??

i am well....and hope u r in the same well....
 this reply: 0 points  (with Olaaa!! Perrrfect answer.   in 0 votes )   [?]
 
You have to be logged on to rate
  
shubham.dutt (0)

New kid on the Block

Olaaa!! Perrrfect answer. 0  [0 rates]

shubham.dutt's Avatar

total posts: 3    
offline Offline
Re:Sorry,but i cannot understand c language
 this reply: 0 points  (with Olaaa!! Perrrfect answer.   in 0 votes )   [?]
 
You have to be logged on to rate
  
GoNik (197)

Blazing goIITian

Olaaa!! Perrrfect answer. 31  [52 rates]

GoNik's Avatar

total posts: 964    
offline Offline
U CAN DERIVE IT YAAAR DONT WRY..U WILL UNDERSTAND IT....NOT MUCH DIFFERENCE....

i am well....and hope u r in the same well....
 this reply: 0 points  (with Olaaa!! Perrrfect answer.   in 0 votes )   [?]
 
You have to be logged on to rate
  
guns_and_roses (366)

Blazing goIITian

Olaaa!! Perrrfect answer. 64  [87 rates]

guns_and_roses's Avatar

total posts: 608    
offline Offline

int a[5];


int z =0//no. of zero


int p=0//no. of positive


int n=0//no. of negative


//input


for(int i=0; i<=4;i++)


cin>>a[i];


//condition


for(i=0; i<=4;i++)


{


if(a[i]==0)


z++;


else


{


if(a[i]>=0)


p++;


else


n++;


}


}


//output


cout<<z<<p<<n;

 this reply: 0 points  (with Olaaa!! Perrrfect answer.   in 0 votes )   [?]
 
You have to be logged on to rate
  
 
Forum Index -> Computer Science
Go to:   

Top Offers for goIITians
Correspondence Courses
Brilliant Tutorials
Narayana Institute
Aakash Institute
Classroom/Crash Courses
Narayana - Kota , Delhi , Others
Brilliant Tutorials - Class , Crash
Aakash Institute - Medical , Engg
Online Test Series
Brilliant Tutorials
Narayana Institute
Aakash Institute
Mahesh Tutorials
AMITY      Sri Chaitanya