Pages

Popular Posts

Ads 468x60px

Social Icons

Featured Posts

Friday, 22 August 2014

Ice Bucket Challange



Nowadays, Cyberspace recently enlivened by a viral video featuring popular celebrities and world leaders are accepting the challenge flush water ice, known as "Ice Bucket Challenge".
Take one part challenge, one part charity, sprinkle in some celebrity and cook on high with Facebook.
 This is a campaign to raise awareness about ALS disease in which the participants had to pour a bucket of ice water into his body and then challenge others to do the same. If you can not do that, they have to donate $ 100 to the ALS foundation.

Ice Bucket Challenge originally circulated on social media after a United States baseball player and ALS patients, Pete Frates, floated the idea of ​​a challenge in a video on the social networking site.

Now, More than 1.2 million videos shared on Facebook from June 1 to August 13. These videos are also on-mention more than 2.2 million times on Twitter since July 29. 

Wednesday, 20 August 2014

Algorithm of Highest Common Factor (HCF)

This is algorithm for  HCF

public static int hcf(int a, int b)
        {
                if (b == 0)              // 1 Assignment
                        return a;
                else
                        return hcf(b, a % b);
        }

        public static int hcf(int a, int b, int c)
     {

                return hcf(hcf(a, b), c);       // 1 Assignment

        }

Tuesday, 19 August 2014

This Is Flying Dutchman !

world cup is already passed, but the 2014 World Cup many interesting events and hard to forget.
such a beautiful robin van Persie goal when the Dutch against the Spanish. The match ending 1-5 to the Dutch who came out as the winner in this match van Persie scored a very beautiful goal with a remarkable way. he did a pretty good flying header from 18 yards which made ​​casillas silent.




This goal is one of the best goal on the world cup 2014. 
                                     -->    So, this is flying dutchman !  <--





 

Monday, 18 August 2014

How To Make A Prime Number With c#

After we learn how to check a number if it's a prime number or not, i bring you to learn how to make a prime number code with c#. But before we try to make a code, we must know what's prime number?
 A Prime Number is a number who can be divided evenly only by 1, or itself.
And it must be a whole number greater than 1.  so, do you have logic how to make prime number after you know definition prime number ? 

all right, when we try to make a prime number, we must knowing a key of prime number and this is can be divided only by 1 or itself. and we will need divided on this program. divided on the program is %.

this is a code :
 

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;

namespace chapter_3_exercise_3
{
        class PrimeNumber
        {
            static void Main(string[] args)
            {
                bool Value = false;
                int f;

                Console.WriteLine("    --> PRIME NUMBER APPLICATION ! <--    ");
                Console.WriteLine ("Attention ! \nRule on this Program");
                int A;
                for (A = 1; A < 59; A = A + 1)
                {
                    Console.Write("-");
                    Thread.Sleep (20);
                }
                Console.WriteLine("\n   You Can Check Number untill you want. \n   so, you just entered the number untill you want  \n ");
                int i;
                for (i = 1; i < 59; i =  i + 1)
                {
                    Console.Write("-");
                    Thread.Sleep(20);
                }

                Console.WriteLine("\nEnter The Number  : ");
                int n = Int32.Parse(Console.ReadLine());

                for (int e = 2; e <= n; e++)
                {
                    for (f = 2; f < e; f++)
                    {
                        if (e % f == 0)
                        {
                            Value = true;
                            break;
                        }
                       
                    }
                    if (Value == false)
                        Console.Write("{0} ", f);
                    else
                        Value = false;
                
                }
                Console.WriteLine("\n\n\n");
                int K;
                for (K = 1; K < 59; K = K + 1)
                {
                    Console.Write("-");
                    Thread.Sleep(20);
                }
                Console.WriteLine("\n           | --Thank you -- |");
                int J;
                for (J = 1; J < 59; J = J + 1)
                {
                    Console.Write("-");
                    Thread.Sleep(20);
                }
                Console.ReadLine();



            }

            public static int i { get; set; }
        }
}



when you execute this code will show :



this is will be happened if we entered 19 :



How to check a number if it's prime number or not?

after we learn about alghorithm on a prime number, i will show you the code to make prime number !

using System;
namespace example
{
    class prime
    {
        public static void Main()
        {
            Console.Write("Enter a Number : ");
            int n;
            n = Convert.ToInt32(Console.ReadLine());
            int k;
            k = 0;
            for (int i = 1; i <= n; i++)
            {
                if (n % i == 0)
                {
                    k++;
                }
            }
            if (k == 2)
            {
                Console.WriteLine("This is Prime Number");
            }
            else
            {
                Console.WriteLine(" This is Not Prime Number");
            }
            Console.ReadLine();
        }
    }
}

Prime Number Algorithm

oke, on this posting, i wanna share for alghoritm of prime number.

1. set n ;                // 1 Direct Assignment
2. Display "Enter The Number : "    // n Writes
3. Accept n ;                // 1 Indirect Assignment
4. set k = 0                 // 1 Direct Assignment
5. set i = 1                // 1 Direct Assignment
6. while (i<= n)            // n Comparison
a. if (num % i == 0)            // 1 Assignment
    i. k increment by 1;        // n x n increment
7. i increment by 1            // n increment
8. if(k == 2 )                // 1 Assignment
   a. Display "This Is Prime Number";    // n Writes
      else        
   b. Display "This is Not Prime Number" ;



INTRODUCTION

 bismillahirahmanirrahim .
hello everyone, my name is falah achmad bagusti. i'm from indonesia.
if you know www.falahachmadbagusti.blogspot.com , this is my site. but, i'm very annoying . i'm forget username and password after i change e-mail and password . if you can help me, you can share with me and comment on this blog .
thank you !

Total Pageviews

Followers