Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions task1.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
def case(x):
u=4
for i in range (1,x+1):
print("*"*i)
print("----------")
for i in range (1,x+1):
print(" "*u,"*"*i,"*"*i)
u=u-1
x=eval(input("Enter the size of the Staircase: "))
case(x)
16 changes: 16 additions & 0 deletions task2.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import java.util.Scanner;
public class task2 {
public static void main(String[] args){
Scanner enter=new Scanner(System.in);
System.out.println("Enter the first number");
int first= enter.nextInt();
System.out.println("Enter the second number");
int second= enter.nextInt();
if(first>second)
System.out.println(first+" is grater than "+second );
else if(second>first)
System.out.println(second+" is grater than "+first );
else
System.out.println("The two numbers are equal");
}
}