Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Tutorialspoint

tabla de multiplicar

using System.IO;
using System;

class Program
{
    static void Main()
    {
        
       for (int i=0; i<=5; i++)
       {
           for (int j=0; j<=7; j++)
           {
               int respuesta = i * j;
               Console.Write("\t{0}" , respuesta);
           }
           Console.WriteLine();
       }

    }
}

CalMonCS

using System.IO;
using System;

class Program
{
    static void Main()
    {
        Console.WriteLine("Hello, World!");
    }
}

Compile and Execute C# Sharp Online

// This is Traditionally the first program written.
using System;
using static System.Console;

namespace HelloWorldProgram
{
    class HelloWorld
    {
        static void Main( )
        {
            WriteLine("Hello World I am Cristian!");
            ReadKey( );
        }
    }
}

ToString correto em Struct

using static System.Console;

public class Program {
	public static void Main() => WriteLine(new Cores(80, 20, 160));
}

struct Cores {
	public byte R { get; }
	public byte G { get; }
	public byte B { get; }
	
	public Cores(byte r, byte g, byte b) {
		R = r;
		G = g;
		B = b;
	}
	public override string ToString() => $"{R}, {G}, {B}";
}

//https://pt.stackoverflow.com/q/236022/101

C# ciklai su paaiskinimu kodel neveikia kodas.

using System;

class Program
{
    static void Main () {
        int bendras = 55,
            eilutes = 10;
        char character = '*';
        
        for (int i = 1; i <= bendras; i++) {
            for (int j = 1; j <= eilutes; j++) {
                Console.Write(character);
                bendras--;
            }
            Console.WriteLine("{0} {1}", i, bendras);
        }
        
        for (int k = 1; k <= bendras; k++) {
            Console.Write(character);
        }
    }
}

Compile and Execute C# Sharp Online

import java.util.Scanner;
class prog
{
public static void main(String args[])
{
Scanner sc=new Scanner(System.in);
int a,b;
System.out.prinln("before swapping");
System.out.prinln("enter 1st no.");
a=sc.nextInt();
System.out.prinln("enter 2nd no.");
b=sc.nextInt();
System.out.prinln("after swapping");
a=a+b;
b=a-b;
a=a-b;
System.out.prinln("value of a is"+a+"and b is"+b);
}
}

Advertisements
Loading...

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.