## Key words

C/C++ program, energy band gap, UV-Visible spectrograph

## Introduction

computer is an automatic electronic machine for making calculation and controlling operations that are expressible in numerical or logical term. The old version computers are less powerful and usage compared than today’s computer. Earlier versions are designed with much less advantage. But today’s computers are more powerful and have more usage. Now-a-days computers are used in science and engineering, aerospace technology, weather report, pollution, agriculture, economic planning, astronomy, bio-medical, real time speech recognition, robotics and etc

Many scientific instruments are programmed in C (e.g., CCD cameras and special purpose interface cards invariably come with a C library interfaces). In general, problems in physics are very difficult to solve exactly. In physics, more problems are solved by C/C++ programs. Especially in mathematical physics, numerical calculations such as Newton-Raphson method, Range-Kutta method, Simpson rule, Euler formula, etc., are simply done by C/C++programs. Similarly classical mechanics, quantum mechanics, nuclear physics and nonlinear optics problems are also easily solved by computer languages.

We are facing some difficulties to calculate energy band gap manually while writing my previous article. To come out from that difficulty, we think how do we solve this problem simply? We found one good idea that is C/C++ programming. It is a simplest method and time consumption is low

## Method of determining energy band gap using c/c++ program

The prepared samples are characterized by UV-Visible spectrometer. After completion of the characterization process we have two spectrum namely absorbance and transmittance spectrum. Since the spectrum we take value of wavelength at absorbance or transmittance edge for calculation.

## Formula used

The below mentioned formula is taken to calculate the Energy band gap of the materials 

where,

h -Plank’s constant (6.625×10-34J.sec)

C – Velocity of light (3×108 m/s)

E – 1.602×10-19 Coulomb

## Algorithm ## Program

float h=6.625,c=3,e=1.602,lambda,E;

clrscr(();

printf(“Enter the value of lambda in angstrom unit:”);

scanf(“%f”,&lambda);

scanf(“%f”,&lambda);

E=((h*c)/(e*lambda)*1000);

printf(“\n—————————————————–\n”);

printf(” CALCULATION OF ENERGY BAND GAP \n”);

printf(“——————————————————-\n”);

printf(“——————————————————-\n”);

printf(“lambda\t\t\t\tEnergy band gap \nin X10^(-10)m\t\t\tin eV\n”);

printf(“%f\t\t\t%f\n”,lambda,E);

printf(“——————————————————-\n”);

printf(“\th=6.625×10^(-34)J.sec c=3×10^8 m/sec\n”);

printf(“——————————————————-“);

getch();

## Algorithm ## Program

include<stdio.h>

include<conio.h>

include<string.h>

void main()

Int SNo,n,i;

Char Samplecode;

float h=6.625,c=3,e=1.602,lambda,E;

clrscr();

printf(“Enter ‘n’ value:”);

scanf(“%d”,&n);

for(i=1;i<=n;i++)

{printf(“\nSNo %d:\n”,i);

printf(“Enter Samplecode:\n”);

scanf(“%s”,Samplecode[i]);

printf(“Enter lambda value in angstrom unit:\n”);

scanf(“%f”,&lambda[i]);

clrscr();

printf(“\n——————————————————————-\n”);

printf(” \t CALCULATION OF ENERGY BAND GAP \n”);

printf(“——————————————————————-\n”);

printf(“SNo\tSamplecode\tlambda\t\t\tEnergy band gap \n\t\t\tin X10^(-10)m\t\tin eV\n”);

printf(“——————————————————————-\n”);

for(i=1;i<=n;i++){

E=((h*c)/(e*lambda[i])*1000);

printf(“%d\t%s\t\t%f\t\t%f\n”,i,Samplecode[i],lambda[i],E);

printf(“——————————————————————-\n”);}

printf(“\th=6.625×10^(-34)J.sec c=3×10^8 m/sec\n”);

printf(“——————————————————————-“);

getch();}

## Procedure to get output

The users should follow the following steps

Output is displayed as shown in fig 1 and fig 2. Figure 1: Output and Results for single sample Figure 2:Output and Results for multi sample

## Discussions

The user should enter the lambda value in terms of angstrom unit(x10-10m) only. The user doesn’t worry about that the powers of inputs. You just enter the integer value only. Powers of inputs are calculated manually and are adjusted in our program. Consider the following example, If the user is willing to enter the wavelength in nano meters (10-9m), multiply by 100 and make necessary change in the formula, E=((h*C/lambda*e)*100).

## Conclusion and future enhancements

Computers play a vital role in research and development. It reduces the time consumption in calculation. Some High level languages made easy to calculate this parameter rather than manual calculation. The energy band gap determination is one of the important parameter to analyse the characteristics of chemical elements. In the field of research and development, it is a part. This characterization is very useful to classify the material whether conductor or insulator or semiconductor. The energy band gaps are determined with the help of computer(C Program). In future we need some improvement in turbo C/C++ software. First problem is while run the program powers of inputs can’t be entered when the computer asked to enter the input data. Another one is power of output also cannot be displayed in monitor.