[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[DotGNU]India.cs
From: |
CH Gowri Kumar |
Subject: |
[DotGNU]India.cs |
Date: |
Fri, 29 Nov 2002 02:45:37 +0530 (IST) |
> Does someone want to do it (to learn C# , of course...) ?..
Please find the attachment india.cs
bash$ cscc india.c
bash$ ilrun a.out.exe
....
Regards,
Gowri Kumar
using System;
class India
{
static int[] india = new int[]
{20,6,57,0,17,10,53,0,18,15,47,0,20,14,46,0,18,15,47,0,19,12,49,0,19,12,49,0,21,12,47,0,21,8,51,0,21,10,49,0,20,14,46,0,18,16,46,0,17,16,34,5,23,19,31,10,19,23,17,1,9,10,15,30,14,2,5,12,16,37,8,2,6,8,20,61,20,46,1,12,22,44,2,12,15,6,1,11,6,3,6,17,8,6,15,17,9,1,9,18,5,5,20,13,19,17,7,3,19,17,15,21,8,1,20,6,1,10,11,19,34,5,1,12,7,19,43,13,3,19,44,15,1,19,46,30,50,30,50,28,52,26,54,25,56,24,57,20,60,19,62,16,46,0,19,16,45,0,19,15,46,0,20,14,46,0,21,12,47,0,21,12,47,0,21,12,47,0,23,8,49,0,23,6,51,0,24,4,52,0,-999};
void ShowBorder()
{
int i=0;
for(i = 0; i < 80; i++)
Console.Write("_");
Console.WriteLine("\n");
}
public void Show()
{
int c = 10;
int a,i=0;
int one = 1;
char ch;
bool b;
ShowBorder();
while( (a = india[i]) != -999)
{
if(a != 0)
{
for(;a>0;a--)
{
c++;
if( c == 90)
{
Console.WriteLine("");
c = 10;
}
b = ( (i&1) == 1);
if(b)
ch = '!';
else
ch = ' ';
Console.Write(ch);
}
}
//Console.WriteLine(a);
i++;
}
Console.WriteLine("\t\t\t I love India\n\t\t\t\t - Ch Gowri Kumar\n");
ShowBorder();
}
}
class IndiaApp
{
public static void Main()
{
India i;
i = new India();
i.Show();
}
}
- [DotGNU]Call for test cases... Numeric Formatting, Jonathan P Springer, 2002/11/25
- Re: [DotGNU]Call for test cases... Numeric Formatting, Gopal V, 2002/11/25
- Re: [DotGNU]Call for test cases... Numeric Formatting, Jonathan P Springer, 2002/11/25
- Re: [DotGNU]Call for test cases... Numeric Formatting, Gopal V, 2002/11/25
- Re: [DotGNU]Call for test cases... Numeric Formatting, Rhys Weatherley, 2002/11/25
- Re: [DotGNU]Call for test cases... Numeric Formatting, Jonathan P Springer, 2002/11/26
- [DotGNU]Simple hex dumper (Was: Call for test cases... Numeric Formatting), Gopal V, 2002/11/28
- [DotGNU]Banner in C#, CH Gowri Kumar, 2002/11/28
- [DotGNU]India.cs,
CH Gowri Kumar <=