All pastes #914619 Raw Edit

Someone

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


public class B_1 {

	
	public static void main(String[] args) {
		
		String value, size;
		int i;
		
		System.out.println("enter the size of the subsequency:");
		size=readLn(100);
		int size2 = Integer.parseInt(size);
		
		System.out.println("enter the value to search:");
		value=readLn(100);
		int value2 = Integer.parseInt(value);
		
		for (i=0;i<tamanho;i++)
		{
		System.out.println("Enter the value "+i+1+" :");
		String[] sequency = new String[size2];
		
			//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));
		}
	}
}