fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int a,b,c;
  6. cout << " Ingrese tres numeros. ";
  7. cin >>a>>b>>c
  8. int a,b,c = (a+b > c) + (a+c > b) + (b+c >a);
  9. switch(a,b,c) {
  10. case true:
  11. cout << num << " forma un triangulo./n ";
  12. break;
  13. switch (a+b>c)
  14. cout << "es escaleno";
  15. switch (a=b=c)
  16. cout << "es equilatero";
  17. switch(a==b && b==c) + (a==b||b==c||a==c)
  18. cout<<"es isosseles";
  19. case false:
  20. cout << num << " no forma un triangulo/n ";
  21. break;
  22.  
  23. }
  24. cin.ignore();
  25. cin.get();
  26. }
  27.  
  28. #include <iostream>
  29. using namespace std;
  30.  
  31. int main() {
  32. int a,b,c;
  33. cout << " Ingrese tres numeros. ";
  34. cin >>a>>b>>c
  35. int a,b,c = (a+b > c) + (a+c > b) + (b+c >a);
  36. switch(a,b,c) {
  37. case true:
  38. cout << num << " forma un triangulo./n ";
  39. break;
  40. switch (a+b>c)
  41. cout << "es escaleno";
  42. switch (a=b=c)
  43. cout << "es equilatero";
  44. switch(a==b && b==c) + (a==b||b==c||a==c)*2
  45. cout<<"es isosseles";
  46. case false:
  47. cout << num << " no forma un triangulo/n ";
  48. break;
  49.  
  50. }
  51. cin.ignore();
  52. cin.get();
  53. }
  54.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
8
5
9
compilation info
prog.cob:1: Warning: Invalid indicator 'n' at column 7
prog.cob:5: Warning: Invalid indicator 't' at column 7
prog.cob:8: Warning: Invalid indicator 't' at column 7
prog.cob:12: Warning: Invalid indicator 't' at column 7
prog.cob:14: Warning: Invalid indicator 't' at column 7
prog.cob:16: Warning: Invalid indicator 't' at column 7
prog.cob:21: Warning: Invalid indicator '.' at column 7
prog.cob:24: Warning: Invalid indicator '.' at column 7
prog.cob:29: Warning: Invalid indicator 'i' at column 7
prog.cob:32: Warning: Invalid indicator 't' at column 7
prog.cob:34: Error: syntax error
stdout
Standard output is empty