Advertisement
obernardovieira

[Desafio] Equacoes 2 grau

Nov 2nd, 2013
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.68 KB | None | 0 0
  1. #include <a_samp>
  2.  
  3. main()
  4. {
  5.     print("\n----------------------------------");
  6.     print(" Blank Gamemode by your name here");
  7.     print("----------------------------------\n");
  8. }
  9. funcao2grau(Float:a, Float:b, Float:c, &Float:res1, &Float:res2) {
  10.     new Float:newfloat;
  11.     newfloat = b*b - 4*a*c;
  12.     res1 = (-b+floatsqroot(newfloat))/(2*a);
  13.     res2 = -(b+floatsqroot(newfloat))/(2*a);
  14.     return 1;
  15. }
  16. public OnGameModeInit()
  17. {
  18.     new Float:r[2];
  19.  
  20.     funcao2grau(3.0,1.0,-14.0,r[0],r[1]);
  21.     printf("\n\nR : %f, %f\n",r[0],r[1]);
  22.  
  23.  
  24.     SetGameModeText("Blank Script");
  25.     AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
  26.     return 1;
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement