-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSoftwareTesting.java
More file actions
51 lines (51 loc) · 1.02 KB
/
SoftwareTesting.java
File metadata and controls
51 lines (51 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
import static java.lang.System.out;
import java.util.*;
class SoftwareTesting
{
public static void main(String args[])
{
int ch;
Scanner sc=new Scanner(System.in);
out.println("1-For loop\n2-Do while\n3-If else");
ch=sc.nextInt();
switch(ch)
{
case 1:
int x;
out.println("Enter the number foor table");
x=sc.nextInt();
for(int i=1;i<=10;i++)
{
out.println(i*x);
}
break;
case 2:
int g;
out.println("Enter the value for g");
g=sc.nextInt();
do
{
out.println("\n");
out.println(g);
g++;
}while(g<11);
break;
case 3:
int a;
out.println("enter the number");
a=sc.nextInt();
if(a%2==0)
{
out.println("it is even");
}
else
{
out.println("it is odd");
}
break;
default:
out.println("\nYour entered wrong choice");
break;
}
}
}