Sunday, May 24, 2009

Exercise

/* Custom Project and Libraries Copyright, 2006. Venkat, ISS */

using System;
using System.Collections.Generic;
using System.Text;
using ISS.RV.LIB;

namespace Prog00
{
class Progo2
{
static void Main()
{
// Write the Main Program for Progo2 here...
int C;
double F;
Console.WriteLine("Enter Centigrade:");
ISSConsole.ReadInt(C);
F = 1.8 * C + 32;
Console.WriteLine(F);



#region /* Do not remove this or write codes after this */
ISSConsole.Pause();
#endregion
}
}
}

Exercise

/* Custom Project and Libraries Copyright, 2006. Venkat, ISS */

using System;
using System.Collections.Generic;
using System.Text;
using ISS.RV.LIB;

namespace Prog00
{
class Prog01
{
static void Main()
{
// Write the Main Program for Prog01 here...

double a, b;
Console.WriteLine("Enter salary:");
a = ISSConsole.ReadDouble();
b = a + 0.1 * a + 0.03 * a;
Console.WriteLine(b);

#region /* Do not remove this or write codes after this */
ISSConsole.Pause();
#endregion
}
}
}

Exercise

/* Custom Project and Libraries Copyright, 2006. Venkat, ISS */

using System;
using System.Collections.Generic;
using System.Text;
using ISS.RV.LIB;

namespace Prog00
{
class exe5
{
static void Main()
{
// Write the Main Program for exer2 here...
double d,A;

Console.WriteLine("Enter a number:" + "\t");
d = ISSConsole.ReadDouble();
A= Math.Sqrt(d);
Console.WriteLine("the result is {0:###.##}",A);


}
}
}

Exercise

/* Custom Project and Libraries Copyright, 2006. Venkat, ISS */

using System;
using System.Collections.Generic;
using System.Text;
using ISS.RV.LIB;

namespace Prog00
{
class EX37
{
static void Main()
{
// Write the Main Program for EX37 here...


string s = "institute of system science";
string r = s.Substring(0, 1);
Console.WriteLine(r.ToUpper ());
//s.Substring(10, 1) = s.ToUpper();
//s.Substring(13, 1) = s.ToUpper();
//s.Substring(20, 1) = s.ToUpper();

Console.WriteLine(s);
#region /* Do not remove this or write codes after this */
ISSConsole.Pause();
#endregion
}
}
}

Exercise

/* Custom Project and Libraries Copyright, 2006. Venkat, ISS */

using System;
using System.Collections.Generic;
using System.Text;
using ISS.RV.LIB;

namespace Prog00
{
class EX36
{
static void Main()
{
// Write the Main Program for EX36 here...

//String s = "radar";
//string r=s.Substring ()
string s;
//int i;

Console.WriteLine("Enter a string:");
s = ISSConsole.ReadString();

Console.WriteLine(s.Length);

Console.WriteLine(s.ToLower());

//char[] c = new char[] { ' ', '.' };
string []r = s.Split (' ');

Console.WriteLine(r);


for (int i = 0; i <= s.Length-1;i++ )
{


if ((s.Substring(0, 1) == s.Substring(4, 1)) && (s.Substring(1, 1) == s.Substring(3, 1)))
{
Console.WriteLine("Palindrome");
}
}



//string l = s.Substring(1, 1);
//Console.WriteLine(l);
//string m = s.Substring(2, 1);
//Console.WriteLine(m);
//Console.WriteLine(s.CompareTo(r));
//if (s.Equals(r))
//{
// Console.WriteLine("Palindrome");
//}


#region /* Do not remove this or write codes after this */
ISSConsole.Pause();
#endregion
}
}
}

Exercise

/* Custom Project and Libraries Copyright, 2006. Venkat, ISS */

using System;
using System.Collections.Generic;
using System.Text;
using ISS.RV.LIB;

namespace Prog00
{
class Ex32
{
static void Main()
{
// Write the Main Program for Ex32 here...
int s=0, m=0;

string[] month = new string[12];

int[] sale = new int[11];

for ( m = 0; m < month.Length; m++)
{
Console.WriteLine("Month:{0}", m);

//for (int i = 0; i <= 12;i++ )
//{
// Console.WriteLine("Enter the Sale:");
// ISSConsole.ReadInt();
//}

Console.WriteLine("Enter the Sale:");
s = ISSConsole.ReadInt();
}

if (s > (sale.Length))
{
Console.WriteLine("Maxi sale month:{0}", m);
}
else
{
Console.WriteLine ("Mini sale month:{0}",m);
}





#region /* Do not remove this or write codes after this */
ISSConsole.Pause();
#endregion
}
}
}

String Exercise

/* Custom Project and Libraries Copyright, 2006. Venkat, ISS */

using System;
using System.Collections.Generic;
using System.Text;
using ISS.RV.LIB;

namespace Prog00
{
class ArrSamp
{
static void Main()
{
// Write the Main Program for ArrSamp here...

string[] name = new string[] { "chaw", "yin", "hla" };

Console.WriteLine(name.Length);

for (int i = 0; i < name.Length; i++)
{
Console.WriteLine(name[i]);
}


#region /* Do not remove this or write codes after this */
ISSConsole.Pause();
#endregion
}
}
}