Java programming code
Thursday, January 15, 2009
/* This program determine a pyramide
Sample input 5
Sample output
1
2 2
3 3 3
4 4 4 4
5 5 5 5 5
*/
import java.io.*;
class c710
{
public static void main(String args[])throws IOException
{
BufferedReader in=new BufferedReader(new InputStreamReader(System.in));
//DataInputStream in=new DataInputStream (System.in);
System.out.println("Enter your number:");
int c=Integer.parseInt(in.readLine());
System.out.println("Your result is:");
for(int d=1;d<=c;d++)
{
for(int m=d;m
0 comments:
Post a Comment