MahmoudHassan
Full Member level 6
while i was studying programming , i found that it is hard to write a complete code for a program so that you can show it as a complete product
we can collect good small projects for beginners , i think it will be helpful
________________________________________________
First program
Flip my text
or my text is upside down
Everybody write like that !
¡sıɥʇ ǝʞıl ǝʇıɹʍ ʇ,uɐɔ ı ʎɥʍ
!!!
it is too simple
see the product in the attached files
how to do this ?
whenever your programmed language (c,c++,c# or java)
you need to strings hat will be treated like arrays
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
string dow = "68ㄥ9 ގㄣᄐᄅ⇂0zxɔʌquɯlʞɾɥƃ ɟpsɐdoınʎʇɹǝʍbZXϽ ΛqNWLʞɾHƃℲpS∀dOInʎ⊥ɹƎMÕ',,˙¿¡&-‾<>)(}{][";
// string of flipped chars
string up = "9876 543210zxcvbnmlkjhg fdsapoiuytrewqZXC VBNMLKJHGFDSAPOIUYTREWQ,'`.?!&-_><(){}[]";
// string of ordinary chars not flpped one
string get = textBox1.Text;
// string that written by the user
int t;
string n="";
for (int i = 0; i < get.Length; i++)
{
foreach (char x in up) // go to the char in get search for it in ordinary string
{
if (get==x)
{
t = up.IndexOf(x);
n = n + dow[t]; // after you find it's index put it in the string n
break;
}
}
}
int j = n.Length - 1;
string lr = ""; // make it left to write
for (int i = 0; i < n.Length; j--,i++)
{
lr = lr + n[j];
}
textBox2.Text = lr; display it in textbox2
}
finally don't forget to put good icons
Mahmoud Hassan
we can collect good small projects for beginners , i think it will be helpful
________________________________________________
First program
Flip my text
or my text is upside down
Everybody write like that !
¡sıɥʇ ǝʞıl ǝʇıɹʍ ʇ,uɐɔ ı ʎɥʍ
!!!
it is too simple
see the product in the attached files
how to do this ?
whenever your programmed language (c,c++,c# or java)
you need to strings hat will be treated like arrays
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
string dow = "68ㄥ9 ގㄣᄐᄅ⇂0zxɔʌquɯlʞɾɥƃ ɟpsɐdoınʎʇɹǝʍbZXϽ ΛqNWLʞɾHƃℲpS∀dOInʎ⊥ɹƎMÕ',,˙¿¡&-‾<>)(}{][";
// string of flipped chars
string up = "9876 543210zxcvbnmlkjhg fdsapoiuytrewqZXC VBNMLKJHGFDSAPOIUYTREWQ,'`.?!&-_><(){}[]";
// string of ordinary chars not flpped one
string get = textBox1.Text;
// string that written by the user
int t;
string n="";
for (int i = 0; i < get.Length; i++)
{
foreach (char x in up) // go to the char in get search for it in ordinary string
{
if (get==x)
{
t = up.IndexOf(x);
n = n + dow[t]; // after you find it's index put it in the string n
break;
}
}
}
int j = n.Length - 1;
string lr = ""; // make it left to write
for (int i = 0; i < n.Length; j--,i++)
{
lr = lr + n[j];
}
textBox2.Text = lr; display it in textbox2
}
finally don't forget to put good icons
Mahmoud Hassan