my third YouTube video
sivarajan
4 Jun 2014
25 Apr 2014
9 Nov 2013
BASIC program-2
to display the bio data
20 print "name: Siva"
30 print "class:VI-A"
40 print "roll no: 1"
50 end
output
name: Siva
class:VI-A
roll no: 1
BASICprogramming
first program of BASIC
20 PRINT"sivarajan"
30 END
output
sivarajan
output
sivarajan
note: download Q basic to write this program
c ++for c++ programmers
for finding the number <,>or =
#include "iostream.h"
#include "stdio.h"
#include "stdio.h"
void main( );
{
icin>>a
cin>>b
cin>>b
if (a>B)
{
cout<<"greatest no =",a;
}
else if (a<b)
{
cout<<("greatest no = ",b;
}
else if (a=b)
{
cout<<"all are equal ";
}
else
{
cout<<"wrong input"
else
{
cout<<"wrong input"
getchar( );
}
output
23
34
greatest no=34
output
23
34
greatest no=34
8 Nov 2013
c program for programmers - 2
using math .h
#include "stdio.h"
#include "math.h"
void main ( )
{
int a,b,c;
a= 10;
b=20;
c=a+b;
printf("sum=%d\n",c);
getchar( );
getchar( );
}
output
sum=30
output
sum=30
note :
- you can change the operator symbol like + : add , - :subtract , / : divide , * : multiplication ; ^:exportation.
- if you want to write the numbers in decimals write for int write float in printf for %d write %f
c basic for programmers
#include "stdio.h"
void main ( )
{
printf("hello world");
getchar ( );
}
output
hello world
caution:don't forget to put semicolon(;) and download turbo c++ for writing this program
Subscribe to:
Comments (Atom)