View Code of Problem 42

#include<stdio.h>
void main(){
int a,b,c;
  scanf("%d %d %d",&a,&b,&c);
  printf("%d %d",-b+sort(b*b-4*a*c)\2*a,-b-sort(b*b-4*a*c)\2*a);
}
/*
Main.c:2:6: warning: return type of 'main' is not 'int' [-Wmain]
 void main(){
      ^
Main.c: In function 'main':
Main.c:5:3: warning: implicit declaration of function 'sort' [-Wimplicit-function-declaration]
   printf("%d %d",-b+sort(b*b-4*a*c)\2*a,-b-sort(b*b-4*a*c)\2*a);
   ^
Main.c:5:3: error: stray '\' in program
Main.c:5:37: error: expected ')' before numeric constant
   printf("%d %d",-b+sort(b*b-4*a*c)\2*a,-b-sort(b*b-4*a*c)\2*a);
                                     ^
Main.c:5:37: error: stray '\' in program
Main.c:5:37: warning: format '%d' expects a matching 'int' argument [-Wformat=]
*/

Double click to view unformatted code.


Back to problem 42