Showing posts with label C#. Show all posts

Saturday, September 13, 2014

how to make square cardinal number with C# language

  No comments
September 13, 2014

for making square cardinal number is not far different with making triangle, just for script litle bit different.
check this image down !
for (int j=0;j<=4;j++){}
 "for" is squence to make number 0 until 4.
"int" to declare variable, (e.g i,j,k)
"j++" is mean j+1

See full script

Read More

Wednesday, September 10, 2014

intruduce command at visual studio 2012

  No comments
September 10, 2014

i hope you not bore with my post. hahaha.
ok, i'll start this day with command that work with visual studio 2012.
if yesterday, i posted soo long script, i think you would hard to understand.
i will try to make it easy.
how to make a script that have an output like this one ?
check this out !
console.writeline("you're the best dude");

press ctrl + f5 to show it up, but it'll just appear a momment,
how to make it appearing ?
just write this script down under that script like that pict.
console.readline();
that scrip just used for hold the cursor to prevent closing windows before we press enter.
ok, thank you for reading, leave a comment please if you get confuse.

Read More

Friday, September 5, 2014

How to make loading with Script C#

  No comments
September 05, 2014

this day, i will tell you script that changed into loading animation in visual studio 2012.
this is image of loading script
for (int i = 1; 1 <= 50; i++) {
                
                Console.SetCursorPosition(i, 5);
                Console.ForegroundColor = ConsoleColor.Red;
                Console.Write("░");
                Console.SetCursorPosition(20,5);
                Console.Write("{0}",i*(100/50)+"%");
                for (int t = 1; t < 3000000; t++) { }
                if (i == 50) {
                    Console.SetCursorPosition(20, 5);
                    Console.ForegroundColor = ConsoleColor.Yellow;
                    Console.Write("Mission Complete");
                    
                    Console.ReadLine();


change the red colored word to color that you want.
ok, leave a comment if you confusing !

Read More

Thursday, September 4, 2014

how to solve phisics with C# script

  No comments
September 04, 2014

Hi, i'll try to write how to solve phisics with C# script. firstly you have to download Microsoft visual studio 2012. because i used it too. my teacher say "visual studio 2012 more compatible with all program and windows 7. than visual studio 2013"
ok, we start our lesson
firstly i have to declare the component of  wide element

int panjang, lebar, luas;
panjang = 30 (or up to you);
lebar = 20 (or up to you);

luas = panjang * lebar;
console.writeline("the answer is :{0}", luas);
console.readline();

look like this picture
and if you type ctrl + F5 it should appeared windows look like this

ok, thank you for reading and don't forget to leave a message.

Read More