I need to know that how we make a computer programme please help me in it
Answers
Answered by
0
Dainvincible1
English Shakespeare
Computer Programming is not that easy . It takes a lot of time and
concentration to understand.Some os the programing languages are c
++,java,etc.
Below is a sample of c language,
#include<stdio.h>
void main()
{
int a;
clrscr();
printf("given number:");
scanf("%d",&a);
if(a%2==0)
printf("%d is even number");
else
printf('%d is odd number");
getch();
}
∴output for the above program is 4
Below is a sample of c language,
#include<stdio.h>
void main()
{
int a;
clrscr();
printf("given number:");
scanf("%d",&a);
if(a%2==0)
printf("%d is even number");
else
printf('%d is odd number");
getch();
}
∴output for the above program is 4
Answered by
3
I have learned C++ programming so I can teach you about it :)
Firstly You have to attach some header files that will help you to use your function
#include<iostream.h>
#include<conio.h>
Everything you write should be in lower case
//(these are called comments you can use them to remembering things . stuff written after comments wont get executed )
after that you have to start with a main statement
void main () [ Note : no semicolon use after main statement ]
then you can write the program within braces
{
}
For example :
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr(); //clear the screen
cout<<"welcome to C++";
getch(); //Freezes the screen
}
This is the basic program
output is
welcome to c ++
Firstly You have to attach some header files that will help you to use your function
#include<iostream.h>
#include<conio.h>
Everything you write should be in lower case
//(these are called comments you can use them to remembering things . stuff written after comments wont get executed )
after that you have to start with a main statement
void main () [ Note : no semicolon use after main statement ]
then you can write the program within braces
{
}
For example :
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr(); //clear the screen
cout<<"welcome to C++";
getch(); //Freezes the screen
}
This is the basic program
output is
welcome to c ++
Similar questions