@LuisAlbertoAlberto1/

Operadores_Aritmeticos

C#

No description

fork
loading
Files
  • main.cs
  • main.exe

This Plugin Crashed!

Error: Error: must not create an existing file {"type":"CREATE_FILE","wid":"0.4656041312195911","path":"main.cs","file":{"path":"main.cs","content":{"asEncoding":{"base64":"dXNpbmcgU3lzdGVtOwoKY2xhc3MgTWFpbkNsYXNzIHsKICBwdWJsaWMgc3RhdGljIHZvaWQgTWFpbiAoc3RyaW5nW10gYXJncykgewogICAgLyoKICAgICogICsKICAgICogIC0KICAgICogIC8KICAgICogICoKICAgICogICUKICAgICovCiAgICBpbnQgdmFsb3IxID0gMTA7CiAgICBpbnQgdmFsb3IyID0gMzsKCiAgICBDb25zb2xlLldyaXRlTGluZSgiUmVzdWx0YWRvIFN1bWE6IHswfSIsIHZhbG9yMSArIHZhbG9yMik7CiAgICBDb25zb2xlLldyaXRlTGluZSgiUmVzdWx0YWRvIFJlc3RhOiB7MH0iLCB2YWxvcjEgLSB2YWxvcjIpOwogICAgQ29uc29sZS5Xcml0ZUxpbmUoIlJlc3VsdGFkbyBNdWx0aXBsaWNhY2lvbjogezB9IiwgdmFsb3IxICogdmFsb3IyKTsKICAgIENvbnNvbGUuV3JpdGVMaW5lKCJSZXN1bHRhZG8gRGl2aXNpb246IHswfSIsIHZhbG9yMSAvIHZhbG9yMik7CiAgICBDb25zb2xlLldyaXRlTGluZSgiUmVzdWx0YWRvIG1vZHVsbzogezB9IiwgdmFsb3IxICUgdmFsb3IyKTsKCiAgICAvKgogICAgKiArKwogICAgKiAtLQogICAgKi8KCiAgICB2YWxvcjErKzsgLy8xMQogICAgdmFsb3IyLS07IC8vMgoKICAgIENvbnNvbGUuV3JpdGVMaW5lKCJWYWxvcjE6IHswfSIsIHZhbG9yMSk7CiAgICBDb25zb2xlLldyaXRlTGluZSgiVmFsb3IyOiB7MH0iLCB2YWxvcjIpOwoKICAgIGludCByZXN1bHRhZG8gPSB2YWxvcjEgKiB2YWxvcjIgKyA1OwoKICAgIENvbnNvbGUuV3JpdGVMaW5lKCJSZXN1bHRhZG8gezB9IiwgcmVzdWx0YWRvKTsKCgogICAgcmVzdWx0YWRvID0gKHZhbG9yMiArIDUpICogdmFsb3IxOwoKICAgIENvbnNvbGUuV3JpdGVMaW5lKCJSZXN1bHRhZG8gezB9IiwgcmVzdWx0YWRvKTsKCiAgfQp9"},"asBuffer":null},"loaded":true}}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
using System;

class MainClass {
  public static void Main (string[] args) {
    /*
    *  +
    *  -
    *  /
    *  *
    *  %
    */
    int valor1 = 10;
    int valor2 = 3;

    Console.WriteLine("Resultado Suma: {0}", valor1 + valor2);
    Console.WriteLine("Resultado Resta: {0}", valor1 - valor2);
    Console.WriteLine("Resultado Multiplicacion: {0}", valor1 * valor2);
    Console.WriteLine("Resultado Division: {0}", valor1 / valor2);
    Console.WriteLine("Resultado modulo: {0}", valor1 % valor2);

    /*
    * ++
    * --
    */

    valor1++; //11
    valor2--; //2

    Console.WriteLine("Valor1: {0}", valor1);
    Console.WriteLine("Valor2: {0}", valor2);

    int resultado = valor1 * valor2 + 5;

    Console.WriteLine("Resultado {0}", resultado);


    resultado = (valor2 + 5) * valor1;

    Console.WriteLine("Resultado {0}", resultado);

  }
}