All pastes #914642 Raw Edit

Anonymous

public text v1 · immutable
#914642 ·published 2008-02-23 01:38 UTC
rendered paste body
import java.io.IOException;
import java.io.Console;

public class B_1 {

	
	public static void main(String[] args) {
		
		//Console c = System.console(); String login = c.readLine("Enter your login: ");
		
		int i;
		
		Console c = System.console();
		String tam = c.readLine("Introduza tamanho da subsequência:");
		int tamanho = Integer.parseInt(tam);
		
		String val = c.readLine("Introduza valor a pesquisar:");
		int valor = Integer.parseInt(val);
		
		for (i=0;i<tamanho;i++)
		{
		System.out.println("Introduza o valor"+i+1+" :");
		String[] seq = new String[tamanho];
		
			//readLn
		}
		
		/*PARA i=1 ATÉ N {
			PARA j=i ATÉ N
			{
			soma = 0;
			PARA z = i ATÉ j
			{
			soma = soma + sequencia[z]
			}
			SE soma == VALOR ENTÃO
			{
			Subsequencia existe na posição i
			TERMINA
			}
			}
			}
			Subsequência não existe
		
		
	
*/
	}
	/*static String readLn (int maxLg){ //utility function to read from stdin
		{
		byte lin[] = new byte [maxLg];
		int lg = 0, car = -1;
		String line = "";
		try {
		while (lg < maxLg){
		car = System.in.read();
		if ((car < 0) || (car == '\n')) break;
		lin [lg++] += car;
		}
		}
		catch (IOException e){
		return (null);
		}
		if ((car < 0) && (lg == 0)) return (null); // eof
		return (new String (lin, 0, lg));
		}
	}*/
}