Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main(int argc, char *argv[])
- {
- int numero;
- int numeropositivo=0;
- int numeronegativo=0;
- int positivo;
- int negativo;
- int par;
- int impar;
- int valor;
- int numeropar;
- int numeroimpar;
- int x;
- printf ("ingrese un numero");
- scanf ("%d", &numero);
- while (numero!=0){
- printf ("ingrese un numero");
- scanf ("%d", &numero);
- if (numero>0){
- positivo=numero+positivo;
- numeropositivo=numeropositivo+1;
- } else{
- negativo=numero+negativo;
- numeronegativo=numeronegativo+1;
- }
- if (numero%2==0){
- par=numero+par;
- numeropar=numeropar+1;
- } else {
- impar=numero+impar;
- numeroimpar=numeroimpar+1;
- }
- }
- if (valor>0){
- printf ("hay mas cantidad de positivos");
- } else{
- printf ("hay mas cantidad de negativos");
- }
- system("PAUSE");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement