Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.io.BufferedReader;
- import java.io.File;
- import java.io.FileNotFoundException;
- import java.io.FileReader;
- import java.io.IOException;
- import java.util.ArrayList;
- import java.util.List;
- public class SimpleClass {
- public static void main(String[] args) {
- File file = new File(args[0]);
- List<Double> lista = new ArrayList<Double>();
- try {
- BufferedReader br = new BufferedReader(new FileReader(file));
- String st;
- while ((st = br.readLine()) != null)
- lista.add(Double.parseDouble(st));
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
- public Double sinus(List<Double> lista) {
- Double suma = 0.0;
- for(int i = 0; i < lista.size(); i++) {
- suma = suma * Math.pow(-1, i) * (Math.pow(lista.get(0), b))
- }
- return suma;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement