Jan 30, 2013

The Area of Triangle Program

/"The Area of Triangle program"\

#include"stdio.h"
#include"conio.h"
void main();
{
clrscr();
float Base,Height,Teiangle_Area;
printf("Enter the value of Base&Height:");
scanf("%f%f",&Base,&Height);
Triangle_Area=0.5*Base*Height;
printf("The Area of triangle is=%.2f",Triangle_Area);
getch();
}
 

The Volume of Sphere Program

/*The Volume of Sphere Program*/

#include"stdio.h"
#include"conio.h"
#define PI 3 .1416
void main();
{
clrscr();
float Radious,Sphere_Area,Sphere_Volume;
printf("Enter the value of Radious:");
scanf("%f",&Radious);?
Sphere_Area=4*PI*Radious:*Radious;
Sphere_Volume=(4/3)*PI*Radius*Radius*Radius;
printf("The Area of Sphere is=%f\n",Sphere_Area);
printf("The Volume of Sphere is=%f",Sphere_Volume);
getch();
}

Area of Trapezium Program

/*Area of Trapezium Program*/

#include"stdio.h"
#include"conio.h"
void main()
{
clrscr();
float Length,Width,Height,Trapezium_Area;
printf("Enter The Value of Length,Width,&Height");
scanf("%f%f%f",&Length,&Width,&Height);
Trapezium_Area=0.5(Length+Width)*Height;
printf("The Area of Trapezium is=%.2f",Trapezium_Area);
getch();
}

Calculate Area of Rombus Program

/*Calculate Area of Rombus Program*/

#include"stdio.h"
#include"conio.h"
void main()
{
clrscr();
float d1,d2,Rombus_Area;
printf("Enter the value of d1 & d2");
scanf("%f%f",&d1,&d2);
Rombus_Area=0.5*d1*d2;
printf("The Area Of Rombus is=%.2f",Rombus_Area);
getch();
}
 

Program of Verses Area

/*Program of Verses Area*/

#include"stdio.h"
#include"conio.h"
void main()
{
clrscr();
float arm,Square_Area;
printf("Enter the Value of ARM");
scanf("%f",&arm);
Square_Area=arm*arm;
printf("The Area of Square is=%f",Square_Area);
getch();
}

Program of Rectangle Area

/*Program of Rectangle Area*/

#include"stdio.h"
#include"conio.h"
void main()
{
clrscr();
float Length,Width,Rectangle_Area;
printf("Enter the Value of Length & Area");
scanf("%f%f",&Length,&Width);
Rectangle_Area=Length*Width;
printf("The Area of Rectangle is=%f",Rectangle_Area);
getch();
}

Program of finding Leap Year

/*Program of finding Leap Year*/

#include"stdio.h"
#include"conio.h"
void main()
{
clrscr();
int Year,x,y,z;
printf("Enter Year=");
scanf("%d",Year);
x=Year%4;
y=Year%100;
z=Year%400;
if((x==0&&y|=0)||z==0)
printf("This is a Leap Year");
else
printf("this is not a Leap Year");
getch();
}

Conversion brings the month and day Program

/*Conversion brings the month and day Program*/

#include"stdio.h"
#include"conio.h"
void main()
{
clrscr();
int Day,Month;
printf("Enter Days");
scanf("%d",&Day);
Month=Day/30;
Day=Day%30;
printf("Month=%d,Day%d",Month,Day);
getch();
}
 

Converson of Centimeters to Inch Program

/*Conversion of Centimeters to Inch Program*/

#include"stdio.h"
#include"conio.h"
void main();
{
clrscr();
float Centimeter,Inch;
printf("Enter the value of Centimeter");
scanf("%f",&Centimeter);
Inch=Centimeter/2.54;
printf("The Inch Value is=%.2f",Inch);
getch();
}

Conversion of Kilometers to Mile program

/*Conversion of Kilometers to Mile program*/

#include"stdio.h"
#include"conio.h"
void main()
{
clrscr();
float Kilometer,Mile;
printf("Enter the value of Kilometer");
scanf("%f",&Kilometer);
Mile=0.62*Kilometer;
printf("The converson of Kilometer to Mile is =%.2f",Mile);
getch();
}

Find The Absolute Value of an Integer Program

/*Find The Absolute Value of an Integer Program*/

#include"stdio.h"
#include"conio.h"
#include"math.h"
void main()
{
clrscr(0;
int n,AbsoluteValue;
printf("Enter the value of n");
scanf("%d",&n);
AbsoluteValue=abs(n);
printf("%d",AbsoluteValue);
getch();
}

Find the square root of an integer Program

/*Find the square root of an integer Program*/

#include"stdio.h"
#include"conio.h"
#include"math.h"
void main()
{
clrscr();
int n,SquareRoot;
printf("Enter the value of n");
scanf("%d",&n);
SquareRoot=sqrt(n);
printf("%d",SquareRoot);
getch();
}

Showing Integer type Leter Program.

/*Showing Integer type Letter Program.*/

#include"stdio.h"
#include"conio.h"
void main()
{
clrscr();
int x;
long y;
x=789;
y=456987;
printf("%d",x);
printf("\n%10d",x);
printf("\n%05d",x);
printf("\n%-5d",x);
printf("\n%ld",y);
printf("\n%10ld",y);
printf("\\n%010ld",y);
getch();
}

....................................................Out Put............................................................

789
                      789   
00789
789
456987
            456987
0000456987

Jan 29, 2013

Showing 7 Days Temperature

/*Showing 7 Days Temperature*/

#include"stdio.h"
#include"conio.h"
#include"math.h"
void main()
{
int temp[7]={25,27,32,23,31,36,39};
char day[7][20]={"SAT","SUN","MON","TUES","WED","THURES","FRI"};
clrscr();
printf("%5s%20s","Day","Temperature\n");
for(int i=0;i<=7;++i)
{
printf("\n%-10s",Day[i]);
for(int j=0;j=temp[i]++j)
printf("*");
}
getch();
}

Reversing 5 Charcter words

/*Reversing 5 Charcter words*/

#include"stdio.h"
#include"conio.h"
void main()
{
clrscr();
char A[5];
printf("Enter a 5 Character words=");
for(int i=1;1<=5;i++);
scanf("%d",&A[i]);//A[i]=geterchr();
printf("\n There revers Character word is=\n\n");
for(int i=5;i<=1;i--);
printf("%c",A[i]);
getch();
}
 

Prime Numbers (0-20)

/*Prime Numbers (0-20)*/

# include"stdio.h"
#include"conio.h"
void main()
{
//main starts
clrscr();
int i;
printf("Series of prime numbers up to 20 is=\n");
for(i=2;i<=20;i++)
{
for(j=2;j<=20;j++)
if(i%j==0)
break;
}
if(i==j)
printf("%3d",i);
}
getch();
}

Output................
...................................Series of prime numbers up to 20 is=......................................................
.......................................2 3 5 7 11 13 17 19 ......................................................................

To Determine area of triangle

/*To Determine area of triangle*/

#include"stdio.h"
#include"conio.h"
void main()
{
clrscr();
int b=2,h=3;
float area;
area=(b*h)/2.0;
printf("The triangle is=%.2f",area);
getch();
}

1/1+1/2+1/3.........program

/*1/1+1/2+1/3.........program*/

#include"stdio.h"
#include"conio.h"
void main()
{
clrscr();
int i=1;
unsigned long Fact=1;
float s1=0.0,s2=1.0;
do
{
s1=s2;
Fact=Fact*i;
i=i+1;
s2=(s2+1)/(float)Fact;
}
while(s2-s1>0.00005);
printf("Total=%10.5f\n",s2);
printf("Number of interation=%d",i);
getch();
}

Computer Science: Handling of integer data files

Computer Science: Handling of integer data files: /*Handling of integer data files*/ #include #include void main() { clrscr(); FILE*f1,*f2,*f3; int number,i; prin...

Computer Science: What is computer?

Computer Science: What is computer?: Computer is a iron box. When installed program then it is a programmable machine.Computer is a set of electromechanical device, which ...

Siriz calculation C program

/*Siriz calculation C program*/

#include "stdio.h"
#include"conio.h"
void main()
{
clrscr();
int sum=0,n;
printf("Enter the value of=n");
scanf("%d",&n);
for(int i=1;i<=n;i=i+2)
sum+=i*i;\\
sum=sum+i*i;
printf("Total=%d",sum);
getch();
}

This is a Siriz
Calculation C Program. If you need this program you can get it.

/*Adding two numbers using function*/

/*Adding two numbers using function*/

#include"stdio.h"
#include"conio.h"
int sum (int x, int y) ;
void main ()
{
clrscr ();
sum (5,7);
}
sum (int x, int y);
{
primtf("%d",x+y);
getch();
}

If anyone need any adding program they can use this program. This is a very easy to use every people.

Calculating Even and Odd numbers

/*Calculating Even and Odd numbers*/

#include<stdio.h>
#include<conio.h>
void main()
clrscr();
int i,n;
printf("n=?");
scanf("%d",&n);
printf("\nOdd numbers=\n");
i=0;
while(i<n)
{
i++;
if(i%2)
printf("%2nd",i);
}
printf("\n\n Even numbers=\n");
i=1;
while(i<=n)
{
i++;
if(|(i%2))
printf("%2d",i);
}
getch();
}

Display Grading of 100 Student

/*Display Grading of 100 Student*/

#include<stdio.h>
#include<conio.h>
void main()
{

clrscr();
int roll[100],mark[10],sum=0;
float avg;
printf("Result of 100 students of 10 subjects=\n");
printf("\n\n");
for(int i=1;i<=100;i++)
{
printf9"Enter Roll no");
scanf("%d",&roll[i]);
printf("Enter marks of 10 Subjects for Roll no=%d\n:",roll[i]);
for(int j=1;j<=10;j++)
{
scanf("%d",&mark[j]);
sum=sum+mark[ij];
avg=sum/10.0;
}
printf("Average marks=%.2f",avg);
if(avg>=90)
printf("(Grading=A+)\n\n");
else
if(avg>=80&&ave<90)
printf("(Grading=A)\n\n");
else
if(avg>=70&&ave<80)
printf(("(Grading=B+)\n\n");
else
if(avg>=60&&ave<70)
printf("(Grading=B)\n\n");
else
if(avg>=50&&ave<60)
printf("(Grading=C+)\n\n");
else
if(avg>=40&&ave<50)
printf("(Grading=C)\n\n");
else
printf("**FAIL**");
}
getch();
}

Input 100 student 10 subject mark and get their Result sheet.

Matrix Multiplication

/*Matrix Multiplication*/

#include<stdio.h>
#include<conio.h>
void main()
{
int x[2][2]={7,4,5,3};
int y[2][2]={8,7,4,9};
int z[2][2],i,j,k,total=0;
clrscr();
printf("Matrix X is=\n\t\t");
for(i=0;i<2;i++)
{
printf("%d\t",x[i][j]);
printf("\n\t\t");
}
printf("\n Matrix Y is=\n\t\t");
for(i=0;i<2;i++)
{
for(j=0;j<2;j++)
printf("%d\t",y[i][j]);
printf("\n\t\t");
}
printf("\n Multiplication of X and Y is=\n\t\t");
for(i=0;i<2;i++)
{
for(j=0;j<2;j++)
{
for(k=0;k<2;k++)
total=total+x[i][k]*y[k][j];
z[i][j]=total;
printf{"%d\t";z[i][j];}
}
}
prinf("\n\t\t");
}
getch();
}

Addition of two 3*4 matrix

/*Addition of two 3*4 matrix*/

#include<stdio.h>
#include<conio.h>
void main()
{
int A[3][4]={5,7,8,9,4,3,2,1,6,7,9,4};
int B[3][4]={8,3,2,1,5,7,6,4,3,9,8,5};
int C[3][4];
clrscr();
for(int i=0;i<3;i++)
{
for(int j;j<4;j++)
{
C[i][j] A[i][j]+B[i][j];
printf("Additional of two matrix"\n);
printf("%-4d",C[i][j]);
}
}
getch();
}


Output=Additional of two matrix
13 10 10 10 9 10  8 5 9 16 17 9

Result Sheet

/*Result Sheet*/

#include<stdio.h>
#include<conio.h>
#define FIRST 350
#define SECOND 250
void main()
{
clrscr();
float avg;
int total=0,mark[5],roll[10];
printf("\n\n");
for(int-i=1;i<=10;i++)
{
printf("Enter roll-n");
scanf("%d",&roll[i]);
printf("Enter the Marks of 5 subjects for Roll no.=%d\n:",roll[i]);
for(int j=1;j<=5,j++)
{
scanf("%d",&mark[i]);
total=total+mark[i];
}
printf("Total marks=%d",total);
if(total>=FIRST)
printf("(1st Division)\n\n);
else
if(total>=SECOND)
printf("(2nd Division)\n\n");
else
printf("**Fail**");
getch();
}
}

To determine area of circle

/*To determine area of circle*/

#include<stdio.h>
#include<conio.h>
#define PI 3.1416
void main()
{
clrscr();
int D;
float area;
printf("D=?");
scanf("%d",&D);
area=(PI*D*D)/4.0;
printf("Area of the circle=%.2d",area);
getch();
}

Fahrenheit-Centigrade scale converson

/*Fahrenheit-Centigrade scale converson*/

#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
float F,C;
printf("Input The Value of Fahrenheit...=");
scanf("%f",&F);
C=(F-32)/1.8;
printf("The Centigrade Value is..=%.2f",C);
getch();
}

Jan 28, 2013

Handling of integer data files

/*Handling of integer data files*/

#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
FILE*f1,*f2,*f3;
int number,i;
printf("Conters of DATA file\n\n");
f1=fopen("DATA","w");
/*Create Data File*/
for(i=1;i<=10;i++)
{
scanf("%d",&number);
putw(number,f1);
}
fclose(f1);
f1=fopen("DATA","r");
f2=fopen("ODD","w");
f3=fopen("EVEN","w");
while(number=getw(f1)|=FOF)
{
/*read from DATA file*/
if(number%2==0)
putw(number,f3);
/*write to EVEN file*/
else
putw(number,f2);
/*write ODD number*/
}
fclose(f1);
fclose(f2);
fclose(f3);
f2=fopen("ODD","r");
f3=fopen(""EVEN","r");
printf("\n\n Contents of ODD file;\n\n");
while((number=getw(f2))|=EOF)
printf("%4d",number);
printf("\n\n Contents  of EVEN file:\n\n");
while((number=getw(f3))|=EOF)
printf("%4d",number);
fclose(f2);
fclose(f3);
getch();
}

Displaying Floyds Triangle

/*Displaying Floyd,s Triangle*/

#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
int i,j,k;
for(k=1;k<=21;)
{
for(j=1;j<=i)
}
printf("%3d",k);
k++;
j++;
{
printf("\n");
i++;
}
getch();
}

Computing real roots

Computing real roots

#include<stdio.h>
#include<conio.h>
#include<math.h>
void main()
{
clrscr();
float a,b,c,d,x1,x2;
printf("a,b,c=?");
scanf("%f%f%f",&a,&b,&c);
d=sqrt(b*b-4*a*c);
x1=(-b+d)/(2*a);
x2=(-b-d)/(2*a);
printf("x1=%.2f\t x2=%.2f",x1,x2);
getch();
}

Jan 26, 2013

Area and Volume of Sphare

Area and Volume of Sphare

#include<stdio.h>
#include<conio.h>
#define P1 3.14
void main()
{
clrscr();
int D;
float surface,volume;
surface=P1*D*D;
volume=(P1*D*D*D)/6.0;
printf("Surface Area=%.2f\n",surface);
printf("Volume=%.2f",volume);
getch();
}

Selecting the largest 3 Value program

Selecting the largest 3 Value program

#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
float a,b,c,MAX;
printf("Input the value of a,b,c=");
scanf("%f%f%f",&a,&b,&c);
MAX=a;
if(a<b)
MAX=b;
if(b<c);
MAX=c;
printf("The Largest Number is=%f",MAX);
getch();
}

Bangladesh Flag graphics drawing program

Bangladesh Flag graphics drawing program

 #include<stdio.h>
#include<conio.h>
#include<graphics.h>
void main()
{
clrscr();
int driver=DETECT,mode=0;
initgraph(&drive,&mode),"C:\\tc\\bgi");
circle(200,160,35);
setfillstyle(1,RED);
floodfill(200,160,WHITE);
rectangle(100,100,300,220);
setfillstyle(1,GREEN);
floodfill(102,102,WHITE);
getch();
}

Two-stroke samikaran program

Two-stroke samikarana program

 #include<stdio.h>
#include<conio.h>
#include<math.h>
void main()
{
clrscr();
float a,b,c,d,R1,R2;
printf("\n a,b,c=? \n");
scanf("%f%f%f",&a,&b,&c);
D=b*b-4*a*c;
if(D>0)
{
printf("\n Roots are real.\n");
R1=(-b+sqrt(D))/(2.0*a);
R2=(-b-sqrt(D))/(2.0*a);
printf("\n Root1=%.2f\t Root2=%.2f",R1,R2);
}
else
printf("Roots are imaginary.");
getch();
}

1 may be located up to 100 odd number of average program

1 may be located up to 100 odd number of average program

#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
int i,sum=0;
float avg;
for(i=1;1<=100;i++)
{
if(%2)
sum+=i;
sum=sum+i;
}
avg=sum/50.0;
prinf("Average of odd nos (1-100):\n");
printf("%.2f",avg);
getch();
}

The program of Celchias to Fahrenheit

The program of Celchias to Fahrenheit.

#include<stdio.h>
#include<conio.h>
void amin()
{
clrscr();
float C,F;
printf("Input the celcias value=");
scanf("%f",&C);
F=C*(9.0/5.0)+32;
printf("The Fahrenheit value is%.2f",F);
getch();
}

Jan 13, 2013

Processing of Computer

Processing of Computer

1. Input.........Computer work computers that are part of the required information and directions, the portion of the input. That all hardware device is transmitted through the Internet at information, that all the hardware devices as input device.
For example : keyboard, mouse, scanner, document reader, light pen, digital cameras e.t.c.

2.Control unit....Computer inside the control unit,s all managed through an automated process to work. Receive data from a keyboard or other input unit,s, it can be determined where the information inside the computer, through which parts of the computer,s data to be processed, the data will be processed after the work is to define and control the operation.

3.Arithmetic logic unit....Arithmetic Logic unit usually all logical and mathematical function. It consists of various types of electronic circuit.
Arithmetic Logic Unit via a control program to add, subtract, multiply, divide. The program may decide.

4..Memory option..........There are two types of memory main memory, secondary memory, namely :
The main memory........There are two types of  main memory RAM and ROM. RAM is usually connected to the motherboard.This called primary memory.
Secondary memory.......Many types of secondary memory.   For example..........Hard disk, Pain drive, CD, DVD e.t.c.

5..Output operation......Output device through the computer,s  result,s we can learn. CPU via the output device is connected with the output port.

Jan 12, 2013

Part OF Computer

1. Main memory
                                         ......The information is stored in the computer,s main memory is. The two memory-type, such as ROM and RAM are associated with different microprocessors through the bus.
2. Arithmetic logic unit
                                                          .....Make this parts of the process for mathematical problem solving, reasoning and decision Mulch is committed to work. This part of the Microprocessor inside.
3.Control unit
                                   ..........This part of the computer,s controls to various parts of the bus through the coordination and control of all activities.
4. Input device
                                    ..........I entered the information and data via computer. Keyboard and mouse input device. Living is not associated directly with the computer,s. Use the keyboard and bus interface circuits.
5. Output device
                                        ..............Computer inside the unit,s output data sent through the name of the output device. Them to be connected to it via the interface circuit.
6. Microprocessor
                                              ..................An electronic chip microprocessors. Microprocessors and other electronic device with a micro-computer to use it. The central part of the process of microprocessor say Micro-Computer.

Jan 1, 2013

What is computer?



Computer is a iron box. When installed program then it is a programmable machine.Computer is a set of electromechanical device, which can sense electrical signals and logic. It can process this electrical signal according to the logic. It have three part that Input, Output, CPU.
Definition of computer
We have three type computer that
         1. Digital Computer
         2.Hybrid Computer
         3.Super Computer

Computer automatically powers do not work. Discovery computer and use him what to do with the artisans yantrtike. Was an appropriate method according to materials things from the computer into the mathematical power of intelligent machines. The technical aspects of the twentieth century krantelagne hold a candle to the other branches and wide-reaching improvements in the rate of growth.
Computer has an impact on the development of civilization. The application fields abisbabhabe to rise. Modern computer technology from the 1950,s decade started, but already there,s broad expanse. The modern computer is an electronic machine automatically knows some information pre-stored .
Which directed the given input data and information, and yoktika mathematical analysis of the problem and automatically output the desired result and the necessary information and upattake store.

Popular Posts