This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
System.out.println("Hello World!"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Console.WriteLine("Hello World!"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
print "Hello World!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Console.WriteLine("Nhap so thu nhat:"); | |
int val1 = int.Parse(Console.ReadLine()); | |
Console.WriteLine("Nhap so thu hai:"); | |
int val2 = int.Parse(Console.ReadLine()); | |
int Total = val1 + val2; | |
Console.WriteLine("Tong là:" + Total); | |
Console.ReadKey(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
... | |
public class ...{ | |
public static void main(String[] args) { | |
Scanner scanner = new Scanner( System.in ); | |
System.out.print( "Nhap so thu nhat: " ); | |
int val1=Integer.parseInt( scanner.nextLine() ); | |
System.out.print( "Nhap so thu hai: " ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val1 = int(raw_input("Nhap so thu nhat:")) | |
val2 = int(raw_input("Nhap so thu hai:")) | |
Total = val1 + val2 | |
print "Tong là:",Total |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int i, S = 0; | |
Console.WriteLine("Nhap n = "); | |
int n = int.Parse(Console.ReadLine()); | |
for (i = 1; i <= n; i++) | |
S = S + i; | |
Console.WriteLine("Tong là:" + S); | |
Console.ReadKey(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
public class ... { | |
public static void main(String[] args) { | |
int i, S = 0; | |
Scanner scanner = new Scanner( System.in ); | |
System.out.print( "Nhap n = " ); | |
int n = Integer.parseInt( scanner.nextLine() ); | |
for(i =1; i<=n; i++) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
n = int(raw_input("Nhap n = ")) | |
S = 0 | |
for i in range(1,n+1): | |
S = S + i | |
print "Tong là:",S |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
float a, b; | |
Console.WriteLine("Nhap a = "); | |
a = float.Parse(Console.ReadLine()); | |
Console.WriteLine("Nhap b = "); | |
b = float.Parse(Console.ReadLine()); | |
Console.WriteLine("So lon nhat la:" + Max(a,b)); |
OlderNewer