Source identity
| Field | Recorded value |
|---|---|
| Source type | GitHub source |
| Original record | Janady13/School-Work / School Work/4.16.1- LAB- Adjust list by normalizing.java |
| Date | Not specified in source |
| Repository | Janady13/School-Work |
| Revision | 4a666c890caf7c43c47d0572dbcc287373c7a78e |
| Branch | main |
| Path or archive member | School Work/4.16.1- LAB- Adjust list by normalizing.java |
| Original SHA-256 | 77defd8457aa492b2da1f7b31d410afe51c0ea803477d8186c0d002b36ff799c |
| Git blob SHA | e2cc42fb7be772f52b705860fcaa1a1e342e0f6e |
| Reading-copy SHA-256 | 77defd8457aa492b2da1f7b31d410afe51c0ea803477d8186c0d002b36ff799c |
Every recorded occurrence
These 2 records contain identical original source bytes. Their paths and revisions remain part of the archive.
| Original record | Branch or archive | Revision / identifier | Original location |
|---|---|---|---|
| Janady13/School-Work / School Work/4.16.1- LAB- Adjust list by normalizing.java | main | 4a666c890caf7c43c47d0572dbcc287373c7a78e | Open original |
| Janady13/School-Work / School Work/School-Work/School Work/4.16.1- LAB- Adjust list by normalizing.java | main | 4a666c890caf7c43c47d0572dbcc287373c7a78e | Open original |
Recovered source transcript
Download complete source text ↓33 lines · 0.8 KB
import java.util.Scanner;
public class LabProgram {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int size = scan.nextInt();
while(size<=0){
size = scan.nextInt();
}
float weights[] = new float[size];
for(int i = 0;i<weights.length;i++){
weights[i] = scan.nextFloat();
}
float max = weights[0];
for(int i = 1;i<weights.length;i++){
if(max < weights[i]){
max = weights[i];
}
}
for(int i = 0;i<weights.length;i++){
weights[i] = weights[i]/max;
}
for(int i = 0;i<weights.length;i++){
System.out.printf("%.2f ",weights[i]);
}
System.out.println();
}
}