Gurzi Posted February 15, 2006 at 07:52 PM Report Share #14086 Posted February 15, 2006 at 07:52 PM #include <stdio.h> #include <stdlib.h> int is_square(int x,int y) { return x==y*y; } main() { int num,num1; printf("introduza um o num1"); scanf("%d",&num); printf("introduza o 2 num"); scanf("%d",&num1); is_square(num,num1); system("PAUSE"); } tipo era suposto isto retornar 0 ou outro numero qualquer, 0 == false , !=0 > verdadeiro :X eu fiz sem olhar para as soluções e nas solucções está da mesma forma só que já testei em vários compiladores e não faz nada :\\ grr help ? Link to comment Share on other sites More sharing options...
saramgsilva Posted February 15, 2006 at 07:55 PM Report Share #14087 Posted February 15, 2006 at 07:55 PM #include <stdio.h> #include <stdlib.h> int is_square(int x,int y) { return x==y*y; } main() { int num,num1; printf("introduza um o num1"); scanf("%d",&num); printf("introduza o 2 num"); scanf("%d",&num1); is_square(num,num1); system("PAUSE"); } tipo era suposto isto retornar 0 ou outro numero qualquer, 0 == false , !=0 > verdadeiro :X eu fiz sem olhar para as soluções e nas solucções está da mesma forma só que já testei em vários compiladores e não faz nada :\\ grr help ? tens k por valor_logico=is_square( ...); ... e 1 printf para mostrar o k deu... :dontgetit: www.saramgsilva.com As minhas apps no WP7 Marketplace Youtube : Galinho - Windows Phone 7.5 Link to comment Share on other sites More sharing options...
Gurzi Posted February 15, 2006 at 08:13 PM Author Report Share #14089 Posted February 15, 2006 at 08:13 PM esqueçome sempre do printf nos return lol incrivel :X thnks Link to comment Share on other sites More sharing options...
Recommended Posts