Write a program to find first non repeated character in a string 1 23 345 4567 56789 Given string : "Welcome to drive" Write a program to check whether "come" is a part of string or not Given array :{ 7,8,9,1,5,6,3,5} Find missing digits between 0-9
Anónimo
import java.util.*; public class p1{ public static void main(String[] args) { Scanner xyz=new Scanner(System.in); int i,j; System.out.println("Enter The Number: " ); int n=xyz.nextInt(); for(i=1; i<=n; i++) { int k = i; for(j=1; j<=i; j++, k++) { System.out.printf(" %d", k); } System.out.printf("\n"); } } }