Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (4)

Sign In or Sign Up now to post a comment!
  • Realizo todos los pasos exactamente iguales, tengo el codigo igual y las acciones estan todas, pero cuando toco el boton calcular me da 0.000000 todo el tiempo. El boton tiene la accion Touch Up Inside y en el File's Owner esta ligado a la funcion calcular:

    - (IBAction) calcular {

    float x=[cantidad.text float value];

    float y=[slabel.text floatvalue];

    float porcent=(x*y)/100;

    NSString*result=[[NSString alloc]initWithFormat:@"%f",por­cent];

    [result release];

    }

    El compilador no da errores

  • @FranComoVaEso Ah! Estoy trabajando con Xcode 4, SDK 4

  • @FranComoVaEso en la línea de float x = [cantidad.text float value];

    tu tienes el float value separado y va junto, así como lo tienes en la declaracion de la variable y.

    Saludos.

  • Estoy perdiendo el Tiempo Programando en Netbeans !!!

    Esto es mas facil y mas innovador ..

    Me cambio al instante !!! :)

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more