-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprac7_1.java
More file actions
45 lines (38 loc) · 1.08 KB
/
Copy pathprac7_1.java
File metadata and controls
45 lines (38 loc) · 1.08 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
import java.util.Scanner;
class prac7_1{
public static void main(String [] args ){
Scanner sc = new Scanner(System.in);
fahrenheit(13);
// String msg= (a%2==0) ? "even" :"odd";
// System.out.print(msg);
// int n = sc.nextInt();
// multiplication(n);
// patter(4);
// pattern2(4);
}
static void fahrenheit (float a){
float fah = ((a*9)/5) + 32;
System.out.print(fah);
}
/* static void patter(int r){
for(int a=1; a<=r; a++){
for(int b=1; b<=a; b++){
System.out.print("*");
}
System.out.println();
}
}
static void multiplication(int n){
for(int i= 1; i<=10; i++){
System.out.format("%d X %d = %d\n",n,i,n*i);
}
}*/
/* static void pattern2(int n){
for(int i=1; i<=n; i++){
for(int j=i; j<=n; j++){
System.out.print("*");
}
System.out.println();
}
}*/
}