• Image 1
  • Image 2
  • Image 3
  • Image 4
  • Image 5
  • Image 6
  • Image 7




Showing posts with label C. Show all posts
Showing posts with label C. Show all posts

Monday, October 22, 2012

PROGRAM LANGUAGE C - CONDITION USING IF


Welcome to my blog.. now in this article, I want giving you tutorial language C using IF.. Previously, you must the program C for making the program. You can copy this coding, and paste in your program or notepad, but if you copy on notepad, you must change save as become “C”.

Example 1 :

#include <conio.h>
#include <stdio.h>

int main()
{
again:
clrscr();
int your_select, countinue, select_again;
printf("============ Welcome Premier Inggris Lovers ============ \n");
printf("    This Is My Sample Program Language C About ISL \n");
printf("                 Only On Or Just On \n");
printf("                  WE ARE KNOWLEDGE \n");
printf("            Lets Choice Your Favorit Team FC \n \n");
printf("        Press Any Number And Enter To Countinue ...");
scanf("%d",&countinue);
clrscr();
printf("Please Your Favorite Football Club : \n");
printf("========== Football Club =========== \n");
printf("1. Persija Football Club \n");
printf("2. Persib Football Club \n");
printf("3. Sriwijaya Football Club \n");
printf("4. Arema Football Club \n");
printf("5. Persipura Football Club \n");
printf("6. Persela Football Club \n \n \n");
printf("Masukan Pilihan Menu Anda : ");
scanf("%d",&your_select);
if (your_select == 1)
{
printf("\n You Are Choice PERSIJA \n");
}
else if (your_select == 2)
{
printf("\n You Are Choice PERSIB \n");
}
else if (your_select == 3)
{
printf("\n You Are Choice SRIWIJAYA \n");
}
else if (your_select == 4)
{
printf("\n You Are Choice AREMA \n");
}
else if (your_select == 5)
{
printf("\n You Are Choice PERSIPURA \n");
}
else if (your_select == 6)
{
printf("\n You Are Choice PERSELA \n");
}                  
else
{
printf("\n Oh no... you are wrong !!! \n \n \n");
}
printf("You Will Choice Your Favorit FC Again ?? [Y = 1/ N = 0] : ");
scanf("%d",&select_again);
if (select_again == 1)
{
goto again;
}
else
{
printf("Thanks You");
}
getch ();
return 0;
}


Logic :

Clrscr >> for cleaning the output window.

Conio.h and stdio.h >> for calling on folder it.

Printf >> for printing in output window

Scanf >> for input on output window.

Getch and retutn >> for return the value and ending the program.

If >> is conditional, to be found : iF, IF then else, if else if else.



Ok..just it..
I hopr you understand…
See you later

Saturday, October 20, 2012

PROGRAM LANGUAGE C - CONDITION USING SWITCH


Welcome to my blog at “We Are Knowledge”. Now I want discuss program language C. And my tutorial is using condition with “switch”. Using switch in program language C likely used in other program language like as : program language C++, pasca, and other.
And this sample coding. Previously you must software for making program language C like as 
: Borland C++ or turbo C. if it is, you can copy this and paste in your compiller.


Example 1 :

#include <stdio.h>
#include <conio.h>
int main()
{
int choice, next;
printf("============ Welcome Customer ============ \n");
printf("    This Is Sample Program Language C \n");
printf("                Only On \n");
printf("  Only On have-fun-and-enjoy.blogspot.com \n");
printf("              Ayam Goreng \n \n");
printf("Press Any Number And Enter To Countinue ...");
scanf("%d",&next);
clrscr();
printf("Please Your Favorite Football Club : \n");
printf("========== Football Club =========== \n");
printf("1. Chelsea Football Club \n");
printf("2. Arsenal Football Club \n");
printf("3. Man.United Football Club \n");
printf("4. Liverpool Football Club \n");
printf("5. Tottenham United Football Club \n");
printf("6. Man. City United Football Club \n \n \n");
printf("Masukan Pilihan Menu Anda : ");
scanf("%d",&choice);
switch(choice)
{
case 1:
printf("\n You Are Choice CHELSEA \n");
break;
case 2:
printf("\n You Are Choice ARSENAL \n");
case 3:
printf("\n You Are Choice MAN. UNITED \n");
break;
case 4:
printf("\n You Are Choice LIVERPOOL \n");
break;
case 5:
printf("\n You Are Choice TOTTENHAM \n");
break;
case 6:
printf("\n You Are Choice MAN. CITY \n");
break;
default:
printf("\n Oh no... you are wrong !!! \n");
}
getch ();
return 0;
}


Logic :

Choice, next
>> is variable with integer data type.

Printf
>> for print in output window

Scanf
>> for input number or char in output window

%d
>> for data type integer.

Clrscr
>> for cleaning output window

Switch..
>> is conditional . to be found 2 (two) condition on language C, IF and switch.



Ok.. just it..
I hope you understand…
See you later

Monday, October 15, 2012

PROGRAM LANGUAGE C - CONSTANT


Hi. Hi.. Hi… Hi The IT knowledge lovers, thanks to your visit, yes that’s right you are on my blog at “We Are Knowledge”.. In here you will getting IT knowledge.. Because I was provided you about it..


Likely this article to fill IT knowledge, because in this article,, I want discuss abot progralm language C. And topic is Constant in program language C.. you will know ? let’s do read this article.. have fun friend to read this…


You know constant in program language C ? Constant on program language C is its absolute value, this is absolute in the sense that its value does not change - change despite repeated program - again to stop.


Example constant :

A = A + 2;
B = 2 + C;
C = A + B + 3;


and for the constant is the number 2 (two) and 3 (three), although the program will continue to repeat, figure 2 (two) and 3 three) is always the same no change. Unlike case with the character "A, B, and C" is called varabel, and the variable is a value that is always changing - change up a program to stop execution.


To be found 4 (four) constant on program language C, that is :

      1.       Integer Numeric Constants
>> constants in this form is a constant with a value rounded. 
      Ex : 34, 23, -12

      2.       Numerical Constant Fraction
>> constants in this form is a constant with a value of fractions or decimals. 
      Ex : .75

      3.       Character Constants And String Constants
>> for these constants form, written or clamped between single ethical mark. 
     Ex : ‘y’

      4.       Escape Character Constants
>> to form these constants, are used to seeing the end result of the program, and usually to embellish the output. 
     Ex : \a, \n, \r



Ok.. just for it..
I hope this usefully
See you later

Sunday, October 14, 2012

PROGRAM LANGUAGE C - USING VARIABLE


Hi… Hi. Hi.. Hello the IT knowledge (science) lovers.. you are on my blog, in here to be found many IT knowledge from desktop programming until web programming. Like as : Php, Html, MySQ, that is a web programming, and for desktop programming like as : cobol, c, c++, visual basic, and other.


What do you find ? about program language C ? if yes, you are was choice the right blog, because in this  article I want discuss about program language C. and I want giving you sample simple program using language C with variable. You are ready ? so let’s do read this article, have fun to read…


Previously you making the program language C you must having the compiler program, like as : Borland C++ or Turbo C. you can using it.


Variables in C programming language is a value that are changing - a fox for prooses execution continues. or value which would stop changing when ekseskusi stop
Characters in the C programming language is that its value remains, though in a state run program continued or repeated - constantly. or character is a fixed rate until the execution is terminated


And this simple program, you can copy or write on notepad or direct to the program :
Example 1 :


#include <stdio.h>
main()
{
int n, i;
long int factorial= 1;
printf ("Input factorial: ");
scanf ("%d", &n);
for (i = 2; i <= n; i++)
factorial= factorial* i;
printf ("%d factorial= %d", n, factorial);
scanf ("%d", &n);
}


Logic

#include <stdio.h>
>> for include file in folder “stdio.h>

main()
>> for starting the program

{
>> opening brace

int a,b;
>> declare variables a and b

long int factorial = 1;
>> declare a variable factorial equals 1

printf ("Please Input factorial your : ");
>> for print sentence “Please Input factorial your”

scanf ("%d", &a);
>> for input the factorial

for (b = 2; b <= a; b++)
>> looping

Factorial = factorial * b;
>> operator

printf ("%d factorial= %d", a, factorial);
>> print value

scanf ("%d", &a);
>> (optional) only to see the value that is not straight out

}
>> closing braces



Ok.. just it…
See you laters

Friday, October 12, 2012

EXAMPLE OF SIMPLE PROGRAM LANGUAGE C

Hi IT knowledge lovers, you are on the blog to fill many science. Yes, that is my mind. I making this blog for you, and other people, because I like sharing science, but about IT knowledge. I sharing IT knowledge about dekstop programming, web programming, and design graphic program.


Now, I want next tutorial about “program language C”. Previously I was starting with introduction about it. If you do not reading, you can get and take in my blog, at we are knowledge blog. That is I giving what it the program language, who made it ?, and etc.
Previously if you will making program language C you must having the program, like as : turbo C or borland C++. You can choice 1 (one) of the two. For this article, I want giving you example of a simple program with using program language “C”. you can copy and paste this coding in your notepad or your program.


Example 1 :

#include <conio.h>
#include <stdio.h>
main()
{
clrscr();
printf("Hello You Are On We Are Knowledge Blog \n");
printf("I very like Program Language C \n");
printf("Lets Do Try The Other Program \n");
printf("See You Tomorrow \n");
getch();
}


Logic :

#include <conio.h>

function to include files in the folder conio.h, and in order to function “clrscr” can be used


#include <stdio.h>

function to include files in the folder stdio.h, and in order to function “printf” can be used


main

for starting your program, before you inut the syntax.


clrscr

for cleanig output window which had previously been printed


printf

this statement for command print in to output window


/n

You can use it, if you will making new line


Getch

For closing your program.


To result :

Hello You Are On We Are Knowledge Blog
I very like Program Language C
Lets Do Try The Other Program
See You Tomorrow


Ok.. just it…
May be useful…
See you later

Thursday, October 11, 2012

INTRODUCTION OF PROGRAM LANGUAGE C


     Hello my friends, welcome to my blog at “We Are Knowledge”. In here you willl getting andtaken many IT knowledge, because I was provided for you many Programming and tutorial using. What do you looking for about IT knowledge ? if yes it.. You are was choicethe right blog, because this blog to fill IT knowledge from desktop programming until programming.


     Now in this article I want giving you about program language “Language C”. Please remember, this is program language C not program language C++. Program language C andprogram language C++ almost the same. The exact programming language C + + is a C language development proceeds. Youwill known ?? let’s do read this artilce, have fun to read friends.


     Program language C is desktop-based programs that have their own computers as well as language pemrogarman c +, Pascal, Visual Basic 6 and yet others. Likely other program language, in program language C to be found :
    Condition like as : if, if then else, switch.
    Looping like as    : for, do while


     But for using the syntax different of general form. If the programming language C + + there are syntax "cout" then the C programming language to "printf". and the programming language C + + has syntax "cin" berebeda with the C language, with syntax scanf. Yes indeed similar to the Java programming language C.


     If you do not know who the author is making the C language "Brian W. and Dennis M. Ritchie Kerninghan from AT & T Laboratories' year 1978 or the 20th century. If you are will makingthe program C you must having the program like as : turbo C or borland C++. Youv can looking for and downloading without make a payment, because this program is FREE.. and let’s do download the program and try to make it..



Ok.. just it..
This is introduction program language C for you
Se you later.