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_6_Java.java
Scanner scanner = new Scanner( System.in );
boolean isTriangle = true;
char OK = 'Y';
float a,b,c;
do
{
System.out.print("Nhap a = ");
a = Float.parseFloat(scanner.nextLine() );
System.out.print("Nhap b = ");
b = Float.parseFloat(scanner.nextLine() );
View CodeList_6_CSharp.cs
bool isTriangle = true;
char OK = 'Y';
float a,b,c;
do
{
Console.WriteLine("Nhap a = ");
a = float.Parse(Console.ReadLine());
Console.WriteLine("Nhap b = ");
b = float.Parse(Console.ReadLine());
Console.WriteLine("Nhap c = ");
View CodeList_5_Java.java
import java.util.Scanner;
public class Program {
public static void main(String[] args) {
long number;
Scanner scanner = new Scanner( System.in );
System.out.print( "Nhap so he thap phan: " );
number = Long.parseLong(scanner.nextLine() );
System.out.println("Dang nhi phan la:" + binary(number));
View CodeList_5_CSharp.cs
class Program
{
static void Main(string[] args)
{
long number;
Console.WriteLine("Nhap so he thap phan: ");
number = long.Parse(Console.ReadLine());
Console.WriteLine("Dang nhi phan la:" + binary(number));
Console.ReadKey();
}
View CodeList_4_Python.py
def Max(a,b):
max = 0
if a>b:
max=a
else:
max=b
return max
a = float(raw_input("Nhap so thu nhat:"))
b = float(raw_input("Nhap so thu hai:"))
print "So lon nhat la:",Max(a,b)
View CodeList_4_Java.java
import java.util.Scanner;
public class Program {
public static void main(String[] args) {
float a,b;
Scanner scanner = new Scanner( System.in );
System.out.print( "Nhap a = " );
a = Float.parseFloat(scanner.nextLine() );
System.out.print( "Nhap b = " );
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));
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_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_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();
You can’t perform that action at this time.