Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
LAB1.docx
1. JAVA
LAB 1
1:
CODE:-
import java.util.Scanner;
public class Main
{
public static void main(String[] args) {
int n1,n2;
Scanner op=new Scanner(System.in);
System.out.println("Enter No:");
n1 = op.nextInt();
n2 = op.nextInt();
System.out.println(" Sum of two no:"+(n1+n2));
}
}
2. OUTPUT:-
3:
CODE:
import java.util.Scanner;
public class Main
{
public static void main(String[] args) {
int l,u;
Scanner op=new Scanner(System.in);
System.out.println("Enter lower limit and upper
limit :");
l = op.nextInt();
u = op.nextInt();
System.out.println("No. in increasing order:");
for(int i=l+1;i<=u-1;i++)
{
System.out.printf("%d ",i);
3. }
}
}
OUTPUT:-
CODE 4:
import java.util.Scanner;
public class Main
{
public static void main(String[] args) {
Scanner op=new Scanner(System.in);
int n1,n2,n3,lar=0;
System.out.println("Enter three numbers:");
n1 = op.nextInt();
n2 = op.nextInt();
n3 = op.nextInt();
if((n1<=100)&&(n2<=100)&&(n3<=100))