fork download
  1. using static System.Console;
  2.  
  3. namespace metodo_e_funcao {
  4. public class Program {
  5. public static int SomarNumeros(int a, int b) {
  6. int resultado = a + b;
  7. return resultado > 10 ? resultado : 0;
  8. }
  9. public static void dizOla() => WriteLine("Ola");
  10. public static void Main(string[] args) {
  11. WriteLine(SomarNumeros(10,11));
  12. dizOla();
  13. }
  14. }
  15. }
  16.  
  17. //https://pt.stackoverflow.com/q/148868/101
Success #stdin #stdout 0.03s 16084KB
stdin
Standard input is empty
stdout
21
Ola