Question:
Ok, i admit i'm a loser with computers, but can someone plz tell me what's a program and how u can write one?
anonymous
2007-02-21 00:48:14 UTC
Can whoever that answers this question please explain it so that a person who has no idea what a program is can understand? Thanks
Seven answers:
red scar
2007-02-21 01:15:15 UTC
Let us say, you are an obedient student in a certain university. Your teacher instructs you to get the test papers inside her room. What will you do first? What will you do next? The answers to the following questions are what we so called PROGRAMS.



A program is simply a collection of a step-by-step instructions given to the computer to perform.



So in the example stated:



The first thing you will do is ....

1.) Stand up

2.) Say the word "Yes madame"

3.) Open the door

4.) Close the door

5.) Go to her room

6.) Open the door

7.) Get the test papers

8.) Close the door

9.) Go back to your classroom

10.) Give the papers to your teacher

11.) Sit down



Numbers 1 - 11 are all instructions. If you try to PROGRAM that in the computer, it will perform its task and will give its output.



HOW TO WRITE A PROGRAM?



Skeleton Formation (Pseudocode):



IF eat at 7:00 in the morning. THEN

YOU WILL NOT GET LATE IN CLASS

ELSE

YOU WILL GET LATE IN CLASS

END IF



Most beginners in Programming always starts with a skeleton formation. The purpose of the Pseudocode is to see the actual flow of the program that you will be creating.





How I Program in C++



#include



main()

{

int time;

cout<<"What time did you eat?";

cin>>time;



If(time == 7)

{

cout<<"You will not get late in class";

}

else

{

cout<<"You will get late in class";

}

}
ike
2007-02-21 02:18:12 UTC
A program: a whole bunch of "Stuff" that the computer understands and does things with. For example: IE, firefox, safari, opera, or whatever web browser you used to enter this question in. Microsoft word is also a program.. even Microsoft Windows or Macintosh OS X are programs (well.. collections of programs).



How to write a program.. now if you are a "loser with computers" (which if you are using a great services like yahoo answers, you are not THAT much of a loser"), writing a program will be a bit difficult. Take heart, you CAN write a program... ignore the next paragraph if you don't get my humor.



As you can see from the other answers a program starts as a higher level language like C++ or Java (this is semi human understandable such as printf("hi"); ) then something called a complier takes that and turns it into an intermediate language that another part of hte compiler can understand and turns that into a thing called optimized machine code... which is a bunch of 1's and 0's....................................... (well, something like this)



yea.. I almost fell asleep writing that, and I'm a computer engineer.

If you really want to learn how to program take a class on it, snoop around wikipedia or yahoo for programing tutorials. There are many different ways to program, some much easier than others. I started when I was 5 years old programing in something called basic... so its really not that hard ;-)
abhinav j
2007-02-21 01:00:38 UTC
lemme give it a try



The computer understand instruction only in binary (0/1) . Now you need to specify what you want your machine to do for you . So a program is basically a set of instructions that you give to the computer to carry out certain tasks eg add two numbers .



Now a program can be written in many languages ... yuo can write it in 0/1 , use some codes that your machine understands (assembly level) .. or an easy and a prefered way is to write the program in a simpler language like JAVA , C++ , ruby etc ...



Once you write a code in one of the "higher level languages" you need to compile the code so that it turns in 0s and 1s (binary .. because that is all that you computer understands).



Now if you want to start writting programs .. best way is to pick a good book for some programming language and follow it word by word.



Just for fun :-

A simple C program could look like this



main ()

{

printf("Welcome to the world of computers");

}





hope I might have made a point .
anonymous
2007-02-21 00:56:32 UTC
A program is acollection of written instructions that tell the computer to do something. In order to write a program you need to know a programming language. One of the easiest is HTML. Wrtie some HTML code and save your document as anything.html and voila. You've written your first program that gets rendered into a webpage by a web browser like IE!

Of course there are tens of languages available, like Java, C, C++, VB, etc.
carbon_arka
2007-02-21 01:22:34 UTC
you know computer is a stupid machine which can't do anything on its own. you have to tell it what to do. problem is it only undestands 1/0 and you dont understand 1/0. so you need a language which you both understand. here the programming language comes into play. you write your instructions in that language (its called programming) and the computer obeys. without a program a computer is only a black screen. so whatever you see in a computer screen is a program. wanna write one? find a book to learn C++.
anonymous
2007-02-21 01:50:20 UTC
programs are set of instructions that enable computer to perform certain task. it helps hardware to perform tasks. to write program u need to learn a language like c, BASIC, JAVA, etc. this program can be written in notepad. this program is called code. u need to compile this code to run. for that you have compiler.

public class world{

public static void main( String[] a )

{

System.out.println( " hello world");

}



}
KillingJoke
2007-02-21 05:06:20 UTC
ACTUAL MEANING OF A PROGRAM



" SEQUENCE OF INSTRUCTIONS GIVEN TO A COMPUTER TO FIND THE RESULT OF THOSE SEQUENTIAL INSTRUCTIONS (IF YOU CANNOT SOLVE A PROBLEM MANUALLY)"



A LANGUAGE IS A PLATFORM FOR WRITING THE PROGRAMS... A COMPUTER CANNOT UNDERSTAND YOUR ORDINARY LANGUAGE... BY THIS PLATFORM YOU CAN COMMUNICATE WITH THE COMPUTER...



THE GOD OF ALL LANGUAGES IS "C"..

START STUDYING IT...

ALL THE BEST...


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...