elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: (TUTORIAL) Aprende a emular Sentinel Dongle By Yapis


  Mostrar Temas
Páginas: [1]
1  Programación / Programación C/C++ / tengo problemas al compilar este codigo en: 21 Junio 2012, 15:06 pm
#include <stdio.h>
//#include <stdlib.h>


int cociente (int n,int m);
void main(void)
{
   int n,m;
   do{
       printf("Dame dos numeros:");
       scanf("%d %d",&n,&m);

       }

    while((n<=0)||(m<=0))
    {

        printf("El cociente es %d\n",cociente(n,m));

    }
}



//FUNCION

int cociente (int n,int m)
{
    int c,Mayor,menor,acu;
    if(n<m)
    {
        Mayor=m;
        menor=n;
        }
     else
     {
         Mayor=n;
         menor=m;
         }

         acu=menor;
         c=0;
         while(acu<=Mayor)
         {
             acu+=menor;
             c++;
             }
    return (c);
    }


ME MARCA  ERRORES
EN LA LINEA 7 Y 16


GRACIAS

Páginas: [1]
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines