Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main(){
- int a,b,c,d,e,f,g;
- g=0;
- //inserindo os numeros
- scanf("%d %d %d %d %d %d", &a,&b,&c,&d,&e,&f);
- //a questao
- if(a>0){
- g=g+1;
- }
- if(b>0){
- g=g++;
- }
- if(c>0){
- g=g++;
- }
- if(d>0){
- g=g++;
- }
- if(e>0){
- g=g++;
- }
- if(f>0){
- g=g++;
- }
- printf("%d valores positivos", g);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement