Skip to content

Instantly share code, notes, and snippets.

Ngoc Minh TranNgocMinh

Block or report user

Report or block TranNgocMinh

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View CodeList_2_CSharp.cs
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();
View CodeList_2_Java.java
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: " );
View CodeList_2_Python.py
val1 = int(raw_input("Nhap so thu nhat:"))
val2 = int(raw_input("Nhap so thu hai:"))
Total = val1 + val2
print "Tong là:",Total
View CodeList_3_CSharp.cs
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();
View CodeList_3_Java.java
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++)
View CodeList_3_Python.py
n = int(raw_input("Nhap n = "))
S = 0
for i in range(1,n+1):
S = S + i
print "Tong là:",S
View CodeList_4_CSharp.cs
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));
You can’t perform that action at this time.