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 hello{ | |
public static void main(String[] args){ | |
System.out.println("Hello Gist"); | |
} | |
} |
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
using System; | |
public class MyClass | |
{ | |
public static void Main(string[] args) | |
{ | |
Console.WriteLine ("Hello INDIA"); | |
} | |
} |
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
using System; | |
public class MyClass | |
{ | |
public static void Main(string[] args) | |
{ | |
int a=20, b=10; | |
Console.WriteLine ("Arithmetic operation"); | |
Console.WriteLine (a + " + " + b + " = " + (a+b)); | |
Console.WriteLine (a + " - " + b + " = " + (a-b)); |
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
using System; | |
public class MyClass | |
{ | |
public static void Main(string[] args) | |
{ | |
int year; | |
Console.WriteLine("Enter a year: "); | |
year = Convert.ToInt32(Console.ReadLine()); | |
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("TMU CCSIT") | |
# Output - | |
# TMU CCSIT |
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
a=10 | |
b=20 | |
print(a," + ", b, " = " , (a+b)) | |
# Output - | |
# 10 + 20 = 30 |
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
a = float(input("Enter num1: ")) | |
b = float(input("Enter num2: ")) | |
print(a," + ", b, " = " , (a+b)) | |
# Output - | |
# Enter num1: 10.5 | |
# Enter num2: 20.5 | |
# 10.5 + 20.5 = 31.0 |
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
b = float(input("Enter the base of Triangle: ")) | |
h = float(input("Enter the height of Triangle: ")) | |
area = (b*h)/2 | |
print("Area of Triangle: ",(area)) | |
# Output - | |
# Enter the base of Triangle: 11.5 | |
# Enter the height of Triangle: 5 | |
# Area of Triangle: 28.75 |
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
num1 = int(input("Enter num1: ")) | |
num2 = int(input("Enter num2: ")) | |
print("Before swapping: ") | |
print("num1: ",num1," num2: ",num2) | |
temp = num1 | |
num1 = num2 | |
num2 = temp |
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
num1 = int(input("Enter num1: ")) | |
num2 = int(input("Enter num2: ")) | |
print("Before swapping: ") | |
print("num1: ",num1," num2: ",num2) | |
num1 = num1 * num2 | |
num2 = int(num1 / num2) | |
num1 = int(num1 / num2) |
OlderNewer