Free C Language projects
#include<stdio.h>
#include<conio.h>
struct emp
{
long int no,a,b,c,d,e,salary,tot;
char name[30],name1[30];
float i,j,n,s1,s2,s3,per;
}e;
struct student
{
long int no,id;
char na[30],na1[30],na2[30],ac[30];
float a,b,c,d,e;
struct subject
{
long int s1,s2,s3,s4,s5;
long int tot;
float per,rupee;
}su1;
}st1;
struct stud
{
long int no[14],tot,m[6];
char nam[30],nam1[30];
float per;
}s[6];
void main()
{
long int ch,ch1,ch3,ch2,ch4,ch5,ch6,ch7,ch8,ch9,ch10,ch11,ch12,ch13,ch14,ch15,a,b,c,d,e,f,g,h,i,j,k,l,m,n,no1,no2,no3;
long int list1[1000],list[1000],list2[1000],list3[1000],list4[1000],tot=0,pointer=0,swap,dist,size,temp,low,high,mid,flag,element;
long int m1[2][2],m2[2][2],m3[2][2],mn1[3][3],mn2[3][3],mn3[3][3],mt1[2][2][2],mt2[2][2][2];
long int t1[3][3][3],t2[3][3][3],s,ds=0;
char name;
clrscr();
HOME:
clrscr();
textcolor(2);
printf("\n");
printf("\n\n\t\t\t **************************");
printf("\n\n\t\t\t WellCome To The BCA Helper");
printf("\n\n\t\t\t **************************");
printf("\n\n");
printf("\n\n\t\t\t\tPrepaid by VIVEK");
printf("\n\n\t\t\t\tBCA SEM-3");
printf("\n\n\t\t\t\tCollege: SSCCS");
printf("\n\n\t\t\t\tMO: 9638331246");
printf("\n\n\t\t\t\tGuidance : Bharat Makwana");
printf("\n\n\n\n\n");
printf("\n\n\t\t\t\t***************");
printf("\n\n\t\t\t\t1:->FY B.C.A");
printf("\n\n\t\t\t\t2:->SY B.C.A");
printf("\n\n\t\t\t\t3:->TY B.C.A");
printf("\n\n\t\t\t\t0:->EXIT");
printf("\n\n\t\t\t\t***************");
printf("\n\n\n\t\t\t\tSelect The Above Option:->");
scanf("%ld",&a);
if(a==3)
{
printf("\n\n\n\n\n\n\n\n");
printf("\n\n\t\t\t*************************************");
printf("\n\n\t\t\tT.Y.BCA Programs Will Comming Soon,");
printf("\n\n\t\t\tSo Please Wait For A Few Months...VIVEK");
printf("\n\n\t\t\t*************************************");
getch();
clrscr();
goto HOME;
}
if(a==2)
{
printf("\n\n\n\n\n\n\n\n");
printf("\n\n\t\t\t*************************************");
printf("\n\n\t\t\tS.Y.BCA Programs Will Comming Soon,");
printf("\n\n\t\t\tSo Please Wait For A Few Days...VIVEK");
printf("\n\n\t\t\t*************************************");
getch();
clrscr();
goto HOME;
}
if(a>3)
{
printf("\n\n\t\t\t\t");
printf("Please Select Valid Option...!!!!");
getch();
clrscr();
goto HOME;
}
else
{
if(a==1)
{
goto FY;
}
else if(a==0)
{
printf("\n\n\t\t\tAre You Want To Exit This Program...!!!");
printf("\n\n\t\t\tContinue For Press 1,Exit For Press 0 :->");
scanf("%ld",&ch1);
if(ch1>1)
{
printf("\n\n\t\t\tPlease Enter The Valid Option...VIVEK");
getch();
clrscr();
goto HOME;
}
else
{
if(ch1==1)
{
clrscr();
goto HOME;
}
else
{
goto EXIT;
}
}
}
}
//===============FY Start==============
FY:
// clrscr();
// textcolor(2);
clrscr();
printf("\n\n\t\t\t**************************");
printf("\n\n\t\t\t******* Main Index *******");
printf("\n\n\t\t\t**************************");
printf("\n\n\n\n\n");
printf("\n\n\t\t\t 1:->Numeric Program");
printf("\n\n\t\t\t 2:->Home Page");
printf("\n\n\t\t\t 0:->Exit");
printf("\n\n\n\t\t\t Select The Above Option:->");
scanf("%ld",&ch1);
if(ch1>=3)
{
printf("\n\n\t\t\tPlease Select The Valid Option..!!!!");
getch();
clrscr();
goto FY;
}
if(ch1==1)
{
goto NUMERIC;
}
if(ch1==2)
{
clrscr();
goto HOME;
}
if(ch1==0)
{
printf("\n\n\t\t\tAre You Want To Exit This Program...!!!");
printf("\n\n\t\t\tContinue For Press 1,Exit For Press 0 :->");
scanf("%ld",&ch1);
if(ch1>1)
{
printf("\n\n\t\t\tPlease Enter The Valid Option...VIVEK");
getch();
clrscr();
goto FY;;
}
else
{
if(ch1==1)
{
clrscr();
goto FY;
}
else
{
exit(0);
}
}
}
//===================END FY===============
//===================NUMERIC START=========
NUMERIC:
clrscr();
printf("\n\n\t\t\t**************************");
printf("\n\n\t\t\t******* Sub Index *******");
printf("\n\n\t\t\t**************************");
printf("\n\n\n\n\n");
printf("\n\n\t\t\t 1:->Simple Program");
printf("\n\n\t\t\t 2:->IF Condition");
printf("\n\n\t\t\t 3:->LOOP Program");
printf("\n\n\t\t\t 4:->ARRY Program");
printf("\n\n\t\t\t 5:->STRUCTURE Program");
printf("\n\n\t\t\t 6:->Home Page");
printf("\n\n\t\t\t 7:->Main Index");
printf("\n\n\t\t\t 0:->EXIT");
printf("\n\n\t\t\t Select The Above Option:->");
scanf("%ld",&ch2);
if(ch2==5)
{
goto STRUCTURE;
}
if(ch2>=8)
{
printf("\n\n\n");
printf("\n\n\t\t\tPlease Select The Valid Option...!!!!");
getch();
clrscr();
goto NUMERIC;
}
if(ch2==1)
{
goto SIMPLE;
}
if(ch2==2)
{
goto IF;
}
if(ch2==3)
{
goto LOOP;
}
if(ch2==4)
{
goto ARRAY;
}
if(ch2==6)
{
clrscr();
goto HOME;
}
if(ch2==7)
{
clrscr();
goto FY;
}
if(ch2==0)
{
printf("\n\n\t\t\tAre You Want To Exit This Program...!!!");
printf("\n\n\t\t\tContinue For Press 1,Exit For Press 0 :->");
scanf("%ld",&ch1);
if(ch1>1)
{
printf("\n\n\t\t\tPlease Enter The Valid Option...VIVEK");
getch();
clrscr();
goto NUMERIC;
}
else
{
if(ch1==1)
{
clrscr();
goto NUMERIC;
}
else
{
exit(0);
}
}
}
//================NUMERIC END=============
//================SIMPLE STARTING=========
SIMPLE:
clrscr();
do
{
printf("\n\n\t\t\t*********************************");
printf("\n\n\t\t\t******** SIMPLE PROGRAM *********");
printf("\n\n\t\t\t*********************************");
printf("\n\n");
printf("\n\n\t\t\t 1:Enter Your Name And Display It.");
printf("\n\n\t\t\t 2:Enter Your Address And Display It");
printf("\n\n\t\t\t 3:Enter Your Address And Display Center.");
printf("\n\n\t\t\t 4:Enter Any Number And Display It.");
printf("\n\n\t\t\t 5:Enter Two Number And Display It.");
printf("\n\n\t\t\t 6:Enter Two Number And Display Addition.");
printf("\n\n\t\t\t 7:Enter Two Number And Display Arithmatic Operation.");
printf("\n\n\t\t\t 8:Enter Value In METER And Display Kilometer.");
printf("\n\n\t\t\t 9:Enter Value In Kilometer And Display Meter.");
printf("\n\n\t\t\t 10:To Find Out Simple Interest.");
printf("\n\n\t\t\t 11:Enter One Value And Find QUBE.");
printf("\n\n\t\t\t 12:Enter One Value And Find SQUARE.");
printf("\n\n\t\t\t 13:Enter Value Celsius And Find Feranhit Value.");
printf("\n\n\t\t\t 14:Enter Meter Value And Find KM As Well As Meter.");
printf("\n\n\t\t\t 15:Enter Value Kilogram And Display In Gram.");
printf("\n\n\t\t\t 16:Enter Value Ton And Display In Kilogram.");
printf("\n\n\t\t\t 17:Home Page\t18:Sub Index\t19:Main Index\t0:EXIT");
printf("\n\n\n\t\t\t Select The Above Option:->");
scanf("%ld",&ch3);
if(ch3>=20)
{
printf("\n\n\n");
printf("\n\n\t\t\tPlease Select The Valid Option...!!!!");
getch();
clrscr();
goto SIMPLE;
}
if(ch3==17)
{
clrscr();
goto HOME;
}
if(ch3==18)
{
clrscr();
goto NUMERIC;
}
if(ch3==19)
{
clrscr();
goto FY;
}
if(ch3==0)
{
printf("\n\n\t\t\tAre You Want To Exit This Program...!!!");
printf("\n\n\t\t\tContinue For Press 1,Exit For Press 0 :->");
scanf("%ld",&ch1);
if(ch1>1)
{
printf("\n\n\t\t\tPlease Enter The Valid Option...VIVEK");
getch();
clrscr();
goto SIMPLE;
}
else
{
if(ch1==1)
{
clrscr();
goto SIMPLE;
}
else
{
exit(0);
}
}
}
switch(ch3)
{
case 1:
printf("\n\n\t\tEnter Your Name:->");
scanf("%s",name);
printf("\n\n\t\tYour Name Is:->%s",name);
getch();
clrscr();
break;
case 2:
printf("\n\n\t\t**********************");
printf("\n\n\t\tName: Vivek");
printf("\n\n\t\tVillage: Jaliya Manaji");
printf("\n\n\t\tTahshil: Palitana");
printf("\n\n\t\tDistrict:Bhavnagar");
printf("\n\n\t\t**********************");
getch();
clrscr();
break;
case 3:
printf("\n\n\t\t\t\t*********************");
printf("\n\n\t\t\t\tName: Vivek");
printf("\n\n\t\t\t\tVillage: Jaliya Manaji");
printf("\n\n\t\t\t\tTahshil: Palitana");
printf("\n\n\t\t\t\tDistrict:Bhavnagar");
printf("\n\n\t\t\t\t*********************");
getch();
clrscr();
break;
case 4:
printf("\n\t\tEnter Any One Number:->");
scanf("%ld",&a);
printf("\n\n\t\t****************************");
printf("\n\n\t\tThe Entered Number Is [%ld]",a);
printf("\n\n\t\t****************************");
getch();
clrscr();
break;
case 5:
printf("\n\t\tEnter The First Number:->");
scanf("%ld",&no1);
printf("\n\t\tEnter The Second Number:->");
scanf("%ld",&no2);
printf("\n\n\t\t******************************");
printf("\n\n\t\tThe First Number Is [%ld]",no1);
printf("\n\n\t\tThe Second Number Is [%ld]",no2);
printf("\n\n\t\t******************************");
getch();
clrscr();
break;
case 6:
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\tEnter The First Number:->");
scanf("%ld",&no1);
printf("\n\t\t\t\tEnter The Second Number:->");
scanf("%ld",&no2);
c=no1+no2;
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\t***********************************");
printf("\n\n\t\t\t\tThe Addition Of Two Number [%ld]",c);
printf("\n\n\t\t\t\t***********************************");
getch();
clrscr();
break;
case 7:
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\tEnter The First Number:->");
scanf("%ld",&no1);
printf("\n\t\t\t\tEnter The Second Number:->");
scanf("%ld",&no2);
a=no1+no2;
b=no1-no2;
c=no1*no2;
d=no1/no2;
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\t***********************************");
printf("\n\n\t\t\t\tThe Addition Of Two Number [%ld]",a);
printf("\n\n\t\t\t\tThe Substraction Of Two Number [%ld]",b);
printf("\n\n\t\t\t\tThe Multiplication Of Two Number[%ld]",c);
printf("\n\n\t\t\t\tThe Division Of Two Number [%ld]",d);
printf("\n\n\t\t\t\t***********************************");
getch();
clrscr();
break;
case 8:
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\tEnter Value In Meter:->");
scanf("%ld",&no1);
c=no1/1000;
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\t***********************************");
printf("\n\n\t\t\t\tThe Kilometer Value [%ld]",c);
printf("\n\n\t\t\t\t***********************************");
getch();
clrscr();
break;
case 9:
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\tEnter Value In Kilometer:->");
scanf("%ld",&no1);
c=no1*1000;
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\t***********************************");
printf("\n\n\t\t\t\tThe Meter Value [%ld]",c);
printf("\n\n\t\t\t\t***********************************");
getch();
clrscr();
break;
case 10:
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\tEnter The Total Amount:->");
scanf("%ld",&no1);
printf("\n\n\t\t\t\tEnter The Duration In Year:->");
scanf("%ld",&no2);
printf("\n\n\t\t\t\tEnter The Rate:->");
scanf("%ld",&no3);
a=no1*no2*no3;
b=a/100;
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\t***********************************");
printf("\n\n\t\t\t\tThe Simple Interest Is [%ld]",b);
printf("\n\n\t\t\t\t***********************************");
getch();
clrscr();
break;
case 11:
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\tEnter Number For Find Qube:->");
scanf("%ld",&no1);
c=no1*no1*no1;
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\t***********************************");
printf("\n\n\t\t\t\tThe Qube Of Given Number [%ld]",c);
printf("\n\n\t\t\t\t***********************************");
getch();
clrscr();
break;
case 12:
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\tEnter Number For Find Squre:->");
scanf("%ld",&no1);
c=no1*no1;
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\t***********************************");
printf("\n\n\t\t\t\tThe Squre Of Given Number [%ld]",c);
printf("\n\n\t\t\t\t***********************************");
getch();
clrscr();
break;
case 13:
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\tEnter Value In Celcius:->");
scanf("%ld",&no1);
c=no1*1.8;
a=c+32;
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\t***********************************");
printf("\n\n\t\t\t\tThe Feranhit Value Is [%ld]",a);
printf("\n\n\t\t\t\t***********************************");
getch();
clrscr();
break;
case 14:
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\tEnter Value In Meter:->");
scanf("%ld",&no1);
a=no1/1000;
b=no1%1000;
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\t***********************************");
printf("\n\n\t\t\t\tThe Kilometer Value [%ld]",a);
printf("\n\n\t\t\t\tThe Meter Value [%ld]",b);
printf("\n\n\t\t\t\t***********************************");
getch();
clrscr();
break;
case 15:
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\tEnter Value In Kilogram:->");
scanf("%ld",&no1);
a=no1*1000;
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\t***********************************");
printf("\n\n\t\t\t\tThe Gram Value Is [%ld]",a);
printf("\n\n\t\t\t\t***********************************");
getch();
clrscr();
break;
case 16:
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\tEnter Value In Tone:->");
scanf("%ld",&no1);
a=no1*1000;
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\t***********************************");
printf("\n\n\t\t\t\tThe Kilogram Value Is [%ld]",a);
printf("\n\n\t\t\t\t***********************************");
getch();
clrscr();
break;
}
}
while(ch3!=0);
//===================IF Starting================
IF:
clrscr();
printf("\n\n\t\t\t**************************");
printf("\n\n\t\t\t****** IF Condition ******");
printf("\n\n\t\t\t**************************");
printf("\n\n\n\n\n");
printf("\n\n\t\t\t 1:->Simple IF Program");
printf("\n\n\t\t\t 2:->IF..ELSE Program");
printf("\n\n\t\t\t 3:->ElSE..IF Program");
printf("\n\n\t\t\t 4:->Home Page");
printf("\n\n\t\t\t 5:->Sub Index");
printf("\n\n\t\t\t 6:->Main Index");
printf("\n\n\t\t\t 0:->EXIT");
printf("\n\n\t\t\t Select The Above Option:->");
scanf("%ld",&ch4);
if(ch4>=7)
{
printf("\n\n\n");
printf("\n\n\t\t\tPlease Select The Valid Option...!!!!");
getch();
clrscr();
goto IF;
}
if(ch4==5)
{
clrscr();
goto NUMERIC;
}
if(ch4==6)
{
clrscr();
goto FY;
}
if(ch4==1)
{
goto SIMPLEIF;
}
if(ch4==2)
{
goto IFELSE;
}
if(ch4==3)
{
goto ELSEIF;
}
if(ch4==4)
{
clrscr();
goto HOME;
}
if(ch4==0)
{
printf("\n\n\t\t\tAre You Want To Exit This Program...!!!");
printf("\n\n\t\t\tContinue For Press 1,Exit For Press 0 :->");
scanf("%ld",&ch1);
if(ch1>1)
{
printf("\n\n\t\t\tPlease Enter The Valid Option...VIVEK");
getch();
clrscr();
goto IF;
}
else
{
if(ch1==1)
{
clrscr();
goto IF;
}
else
{
exit(0);
}
}
}
//==========SIMPLEIF Starting==================
SIMPLEIF:
clrscr();
do
{
printf("\n\n\t\t\t**************************");
printf("\n\n\t\t\t******* IF Program *******");
printf("\n\n\t\t\t**************************");
printf("\n\n\n\n\n");
printf("\n\n\t\t\t 1:If Number Greatre Then 40 Pass.");
printf("\n\n\t\t\t 2:If Number Less Then 40 Fail.");
printf("\n\n\t\t\t 3:If Number == 50 Then Display Saibaba.");
printf("\n\n\t\t\t 4:Check Number Is ODD.");
printf("\n\n\t\t\t 5:Check Number Is EVEN.");
printf("\n\n\t\t\t 6:Check Year Is Leap Year.");
printf("\n\n\t\t\t 7:Check Entered Number is Greater Then 1000.");
printf("\n\n\t\t\t 8:Check Entered Number is Less Then 1000.");
printf("\n\n\t\t\t 9:Check Entered Number Is Less Then 0.");
printf("\n\n\t\t\t 10:Check Entered Number==10,Print VIVEK.");
printf("\n\n\t\t\t 11:Main Menu Of IF Condition");
printf("\n\n\t\t\t 12:Home Page");
printf("\n\n\t\t\t 0:EXIT");
printf("\n\n\t\t\t Select The Above Program:->");
scanf("%ld",&ch5);
if(ch5>=13)
{
printf("\n\n\n");
printf("\n\n\t\t\tPlease Select The Valid Option...!!!!");
getch();
clrscr();
goto SIMPLE;
}
if(ch5==12)
{
clrscr();
goto HOME;
}
if(ch5==11)
{
clrscr();
goto IF;
}
if(ch5==0)
{
printf("\n\n\t\t\tAre You Want To Exit This Program...!!!");
printf("\n\n\t\t\tContinue For Press 1,Exit For Press 0 :->");
scanf("%ld",&ch1);
if(ch1==1)
{
clrscr();
goto SIMPLEIF;
}
else
{
exit(0);
}
}
switch(ch5)
{
case 1:
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\tEnter Any Number:->");
scanf("%ld",&no1);
if(no1>=40)
{
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\t***********************************");
printf("\n\n\t\t\t\tThe [%ld] Number Is Greater Then 40",no1);
printf("\n\n\t\t\t\t***********************************");
}
getch();
clrscr();
break;
case 2:
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\tEnter Any Number:->");
scanf("%ld",&no1);
if(no1<=40)
{
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\t***********************************");
printf("\n\n\t\t\t\tThe [%ld] Number Is Less Then 40",no1);
printf("\n\n\t\t\t\t***********************************");
}
getch();
clrscr();
break;
case 3:
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\tEnter Number 50 For Display Saibaba:->");
scanf("%ld",&no1);
if(no1==50)
{
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\t***********************************");
printf("\n\n\t\t\t\tThe [%ld] Number Is == 50 Saibaba",no1);
printf("\n\n\t\t\t\t***********************************");
}
getch();
clrscr();
break;
case 4:
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\tEnter Any Number For Check ODD:->");
scanf("%ld",&no1);
if(no1%2==1)
{
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\t***********************************");
printf("\n\n\t\t\t\tThe [%ld] Number Is ODD",no1);
printf("\n\n\t\t\t\t***********************************");
}
getch();
clrscr();
break;
case 5:
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\tEnter Any Number For Check EVEN:->");
scanf("%ld",&no1);
if(no1%2==0)
{
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\t***********************************");
printf("\n\n\t\t\t\tThe [%ld] Number Is EVEN",no1);
printf("\n\n\t\t\t\t***********************************");
}
getch();
clrscr();
break;
case 6:
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\tEnter Any Year For Check Leap Year:->");
scanf("%ld",&no1);
if(no1%4==0)
{
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\t***********************************");
printf("\n\n\t\t\t\tThe [%ld] Year Is Leap",no1);
printf("\n\n\t\t\t\t***********************************");
}
getch();
clrscr();
break;
case 7:
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\tEnter Any Number For Check Greater Then 1000:->");
scanf("%ld",&no1);
if(no1>=1000)
{
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\t***********************************");
printf("\n\n\t\t\t\tThe [%ld] Number Is Greater Then 1000",no1);
printf("\n\n\t\t\t\t***********************************");
}
getch();
clrscr();
break;
case 8:
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\tEnter Any Number For Check Less Then 1000:->");
scanf("%ld",&no1);
if(no1<=1000)
{
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\t***********************************");
printf("\n\n\t\t\t\tThe [%ld] Number Is Less Then 1000",no1);
printf("\n\n\t\t\t\t***********************************");
}
getch();
clrscr();
break;
case 9:
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\tEnter Any Number For Check Less Then 0:->");
scanf("%ld",&no1);
if(no1<=0)
{
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\t***********************************");
printf("\n\n\t\t\t\tThe [%ld] Number Is Less Then 0",no1);
printf("\n\n\t\t\t\t***********************************");
}
getch();
clrscr();
break;
case 10:
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\tEnter Any Number 10 For Print VIVEK:->");
scanf("%ld",&no1);
if(no1==10)
{
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\t***********************************");
printf("\n\n\t\t\t\tThe [%ld] Number == 10 So,Vivek",no1);
printf("\n\n\t\t\t\t***********************************");
}
getch();
clrscr();
break;
}
}
while(ch5!=0);
//========================SIMPLEIF Complete===================
IFELSE:
clrscr();
do
{
printf("\n\n\t\t\t**************************");
printf("\n\n\t\t\t******** IF..ELSE ********");
printf("\n\n\t\t\t**************************");
printf("\n\n\n");
printf("\n\n\t\t1:If Marks Greater 40 Then Pass OtherWise Fail.");
printf("\n\n\t\t2:Enter Any One Number And Check Odd Or Even.");
printf("\n\n\t\t3:Enter Any One Year And Check Leap Year OR Not.");
printf("\n\n\t\t4:Enter Any Two Number And Display Maximum Number.");
printf("\n\n\t\t5:Enter Any Two Number And Display Minimum Number.");
printf("\n\n\t\t6:If Number Greater 50 Then Display VIVEK Otherwise CHAVDA.");
printf("\n\n\t\t7:Enter Only Three Digit Number And Display 1 And 2 Digit Sum.");
printf("\n\n\t\t8:Enter Only Three Digit Number And Display 1 And 3 Digit Sum.");
printf("\n\n\t\t9:Enter Any One Number And Check Positive OR Negative Number.");
printf("\n\n\t\t10:Enter Any One Number And Check Single Digit Or Double Digit.");
printf("\n\n\t\t11:Home Page");
printf("\n\n\t\t12:Main Index Of IF Condition");
printf("\n\n\t\t13:Main Index");
printf("\n\n\t\t0:EXIT");
printf("\n\n\t\tSelect The Above Program:->");
scanf("%ld",&ch6);
if(ch6>=14)
{
printf("\n\n\n");
printf("\n\n\t\t\tPlease Select The Valid Option...!!!!");
getch();
clrscr();
goto IFELSE;
}
if(ch6==11)
{
clrscr();
goto HOME;
}
if(ch6==12)
{
clrscr();
goto IF;
}
if(ch6==13)
{
clrscr();
goto FY;
}
if(ch6==0)
{
printf("\n\n\t\t\tAre You Want To Exit This Program...!!!");
printf("\n\n\t\t\tContinue For Press 1,Exit For Press 0 :->");
scanf("%ld",&ch1);
if(ch1==1)
{
clrscr();
goto IFELSE;
}
else
{
exit(0);
}
}
switch(ch6)
{
case 1:
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\tEnter Marks For Check Pass Or Fail:->");
scanf("%ld",&no1);
if(no1>=40)
{
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\t***********************************");
printf("\n\n\t\t\t\tThe Marks [%ld]:-> Pass ,Because Greater Then 40",no1);
printf("\n\n\t\t\t\t***********************************");
getch();
clrscr();
break;
}
else
{
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\t***********************************");
printf("\n\n\t\t\t\tThe Marks [%ld]:-> Fail ,Because Less Then 40",no1);
printf("\n\n\t\t\t\t***********************************");
getch();
clrscr();
break;
}
case 2:
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\tEnter Number For Check ODD Or EVEN:->");
scanf("%ld",&no1);
if(no1%2==0)
{
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\t***********************************");
printf("\n\n\t\t\t\tThe Number [%ld]:EVEN,Bcoze Modulize By 2",no1);
printf("\n\n\t\t\t\t***********************************");
getch();
clrscr();
break;
}
else
{
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\t***********************************");
printf("\n\n\t\t\t\tThe Number [%ld]:ODD,Bcoze Not Modulize By 2",no1);
printf("\n\n\t\t\t\t***********************************");
getch();
clrscr();
break;
}
case 3:
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\tEnter Year For Check Leap Year Or Not:->");
scanf("%ld",&no1);
if(no1%4==0)
{
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\t***********************************");
printf("\n\n\t\t\t\tThe Year [%ld]:Leap Year",no1);
printf("\n\n\t\t\t\t***********************************");
getch();
clrscr();
break;
}
else
{
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\t***********************************");
printf("\n\n\t\t\t\tThe Year [%ld]:Not Leap Year",no1);
printf("\n\n\t\t\t\t***********************************");
getch();
clrscr();
break;
}
case 4:
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\tEnter The First Number:->");
scanf("%ld",&no1);
printf("\n\n\t\t\t\tEnter The Second Number:->");
scanf("%ld",&no2);
if(no1>=no2)
{
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\t***********************************");
printf("\n\n\t\t\t\tThe Number [%ld] Is Maximum",no1);
printf("\n\n\t\t\t\t***********************************");
getch();
clrscr();
break;
}
else
{
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\t***********************************");
printf("\n\n\t\t\t\tThe Number [%ld] Is Maximum",no2);
printf("\n\n\t\t\t\t***********************************");
getch();
clrscr();
break;
}
case 5:
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\tEnter The First Number:->");
scanf("%ld",&no1);
printf("\n\n\t\t\t\tEnter The Second Number:->");
scanf("%ld",&no2);
if(no1<=no2)
{
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\t***********************************");
printf("\n\n\t\t\t\tThe Number [%ld] Is Minimum",no1);
printf("\n\n\t\t\t\t***********************************");
getch();
clrscr();
break;
}
else
{
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\t***********************************");
printf("\n\n\t\t\t\tThe Number [%ld] Is Minimum",no2);
printf("\n\n\t\t\t\t***********************************");
getch();
clrscr();
break;
}
case 6:
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\tEnter Any Number:->");
scanf("%ld",&no1);
if(no1>=50)
{
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\t***********************************");
printf("\n\n\t\t\t\tThe Number [%ld] Is Greater Then 50,VIVEK",no1);
printf("\n\n\t\t\t\t***********************************");
getch();
clrscr();
break;
}
else
{
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\t***********************************");
printf("\n\n\t\t\t\tThe Number [%ld] Is Less Then 50,CHAVDA",no2);
printf("\n\n\t\t\t\t***********************************");
getch();
clrscr();
break;
}
case 7:
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\tEnter Any Three Digit Number:->");
scanf("%ld",&no1);
if(no1>=999 || no1<=99)
{
printf("\n\n\t\t\t\tPlease Enter Only Three OR Two Digit Number...");
getch();
clrscr();
break;
}
else
{
a=no1/100;
b=no1%100;
c=b/10;
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\t***********************************");
printf("\n\n\t\t\t\tThe Number [%ld] Sum Of 1 and 2 Digit:->%ld",no1,a+c);
printf("\n\n\t\t\t\t***********************************");
getch();
clrscr();
break;
}
case 8:
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\tEnter Any Three Digit Number:->");
scanf("%ld",&no1);
if(no1>=999 || no1<=99)
{
printf("\n\n\t\t\t\tPlease Enter Only Three OR Two Digit Number...");
getch();
clrscr();
break;
}
else
{
a=no1/100;
b=no1%100;
c=b%10;
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\t***********************************");
printf("\n\n\t\t\t\tThe Number [%ld] Sum Of 1 and 3 Digit:->%ld",no1,a+c);
printf("\n\n\t\t\t\t***********************************");
getch();
clrscr();
break;
}
case 9:
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\tEnter Any Number:->");
scanf("%ld",&no1);
if(no1>=0 || no1==0)
{
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\t***********************************");
printf("\n\n\t\t\t\tThe Number [%ld] Is Positive.",no1);
printf("\n\n\t\t\t\t***********************************");
getch();
clrscr();
break;
}
else
{
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\t***********************************");
printf("\n\n\t\t\t\tThe Number [%ld] Is Negative.",(no1));
printf("\n\n\t\t\t\t***********************************");
getch();
clrscr();
break;
}
case 10:
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\tEnter Any Number:->");
scanf("%ld",&no1);
if(no1>=0 && no1<=9)
{
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\t***********************************");
printf("\n\n\t\t\t\tThe Number [%ld] Is Single Digit.",no1);
printf("\n\n\t\t\t\t***********************************");
getch();
clrscr();
break;
}
else
{
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\t***********************************");
printf("\n\n\t\t\t\tThe Number [%ld] Is Two Digit.",(no1));
printf("\n\n\t\t\t\t***********************************");
getch();
clrscr();
break;
}
}
}
while(ch6!=0);
ELSEIF:
clrscr();
do
{
printf("\n\n\t\t\t**************************");
printf("\n\n\t\t\t******** ELSE..IF ********");
printf("\n\n\t\t\t**************************");
printf("\n\n\n\n\n");
printf("\n\n\t\t1:Enter Three Subject Marks And Display Total,Per,Class.");
printf("\n\n\t\t2:Enter 1 To 7 Choice And Display Day Of Week.");
printf("\n\n\t\t3:Home Page");
printf("\n\n\t\t4:Main Menu Of IF Condition");
printf("\n\n\t\t5:Main Index");
printf("\n\n\t\t0:EXIT");
printf("\n\n\t\tSelect The Above Option:->");
scanf("%ld",&ch7);
if(ch7>=6)
{
printf("\n\n\n");
printf("\n\n\t\t\tPlease Select The Valid Option...!!!!");
getch();
clrscr();
goto ELSEIF;
}
if(ch7==3)
{
clrscr();
goto HOME;
}
if(ch7==4)
{
clrscr();
goto IF;
}
if(ch7==5)
{
clrscr();
goto FY;
}
if(ch7==0)
{
printf("\n\n\t\t\tAre You Want To Exit This Program...!!!");
printf("\n\n\t\t\tContinue For Press 1,Exit For Press 0 :->");
scanf("%ld",&ch1);
if(ch1==1)
{
clrscr();
goto ELSEIF;
}
else
{
exit(0);
}
}
switch(ch7)
{
case 1:
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\tEnter The First Subject Marks:->");
scanf("%ld",&a);
printf("\n\n\t\t\t\tEnter The Second Subject Marks:->");
scanf("%ld",&b);
printf("\n\n\t\t\t\tEnter The Third Subject Marks:->");
scanf("%ld",&c);
d=a+b+c;
e=d/3;
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\t***********************************");
printf("\n\n\t\t\t\tThe Total is[%ld]",d);
printf("\n\n\t\t\t\tThe Percentage[%ld]",e);
printf("\n\n\t\t\t\tThe Class is:->");
if(e>=70)
{
printf(" Distiction");
}
else if(e>=60)
{
printf("First");
}
else if(e>=50)
{
printf("Second");
}
else if(e>=40)
{
printf("Pass");
}
else
{
printf("Fail");
}
printf("\n\n\t\t\t\t***********************************");
getch();
clrscr();
break;
case 2:
printf("\n\n\t\t\t\tEnter Number Between 1 To 7:->");
scanf("%ld",&no1);
switch(no1)
{
case 1:
printf("\n\n\t\t\t\tMonday");
getch();
clrscr();
break;
case 2:
printf("\n\n\t\t\t\tTuesday");
getch();
clrscr();
break;
case 3:
printf("\n\n\t\t\t\tWednesday");
getch();
clrscr();
break;
case 4:
printf("\n\n\t\t\t\tThrusday");
getch();
clrscr();
break;
case 5:
printf("\n\n\t\t\t\tFriday");
getch();
clrscr();
break;
case 6:
printf("\n\n\t\t\t\tSaturday");
getch();
clrscr();
break;
case 7:
printf("\n\n\t\t\t\tSunday");
getch();
clrscr();
break;
default:
printf("\n\n\t\t\t\tInvalid Choice");
getch();
clrscr();
}
}
}
while(ch7!=0);
//============================LOOP Start=====================
LOOP:
clrscr();
printf("\n\n\t\t\t**************************");
printf("\n\n\t\t\t********** LOOP **********");
printf("\n\n\t\t\t**************************");
printf("\n\n\n\n\n");
printf("\n\n\t\t\t 1:FOR Loop Program");
printf("\n\n\t\t\t 2:While Loop Program");
printf("\n\n\t\t\t 3:DO...While Loop Program");
printf("\n\n\t\t\t 4:Home Page");
printf("\n\n\t\t\t 5:Main Index");
printf("\n\n\t\t\t 0:EXIT");
printf("\n\n\t\t\t Select The Above Option:->");
scanf("%ld",&ch8);
if(ch8>=6)
{
printf("\n\n\n");
printf("\n\n\t\t\tPlease Select The Valid Option...!!!!");
getch();
clrscr();
goto LOOP;
}
if(ch8==1)
{
goto FOR;
}
if(ch8==3)
{
goto DOWHILE;
}
if(ch8==2)
{
goto WHILE;
}
if(ch8==4)
{
clrscr();
goto HOME;
}
if(ch8==5)
{
clrscr();
goto FY;
}
if(ch8==0)
{
printf("\n\n\t\t\tAre You Want To Exit This Program...!!!");
printf("\n\n\t\t\tContinue For Press 1,Exit For Press 0 :->");
scanf("%ld",&ch1);
if(ch1==1)
{
clrscr();
goto LOOP;
}
else
{
exit(0);
}
}
//========================FOR Loop Starting=========================
FOR:
clrscr();
do
{
printf("\n\n\t\t\t**************************");
printf("\n\n\t\t\t******** FOR LOOP ********");
printf("\n\n\t\t\t**************************");
printf("\n\n\n\n\n");
printf("\n\n\t\t\t 1:Print The Ten Time Hello.");
printf("\n\n\t\t\t 2:Print The 1 To 10 Number.");
printf("\n\n\t\t\t 3:Print The 10 To 1 Number.");
printf("\n\n\t\t\t 4:print The 1 To 50 Even Number.");
printf("\n\n\t\t\t 5:Print The 1 To 50 Odd Number.");
printf("\n\n\t\t\t 6:Print The Sum Of 50 Number.");
printf("\n\n\t\t\t 7:Print The Sum Of N number.");
printf("\n\n\t\t\t 8:Print The Sum Of M To N number.");
printf("\n\n\t\t\t 9:Print The Squre Table Of Given Number.");
printf("\n\n\t\t\t 10:print The Qube Table Of Given Number.");
printf("\n\n\t\t\t 11:Print The Leap Year Of N Year.");
printf("\n\n\t\t\t 12:Home Page");
printf("\n\n\t\t\t 13:Main Menu Of Loop");
printf("\n\n\t\t\t 14:Main Index");
printf("\n\n\t\t\t 0:EXIT");
printf("\n\n\t\t\t Select The Above Program:->");
scanf("%ld",&ch9);
if(ch9>=15)
{
printf("\n\n\n");
printf("\n\n\t\t\tPlease Select The Valid Option...!!!!");
getch();
clrscr();
goto FOR;
}
if(ch9==12)
{
clrscr();
goto HOME;
}
if(ch9==13)
{
clrscr();
goto LOOP;
}
if(ch9==14)
{
clrscr();
goto FY;
}
if(ch9==0)
{
printf("\n\n\t\t\tAre You Want To Exit This Program...!!!");
printf("\n\n\t\t\tContinue For Press 1,Exit For Press 0 :->");
scanf("%ld",&ch1);
if(ch1==1)
{
clrscr();
goto FOR;
}
else
{
exit(0);
}
}
switch(ch9)
{
case 1:
for(i=1;i<=10;i++)
{
//textcolor(i+1);
printf("\n\n\t\t\t\tHELLO");
delay(500);
}
getch();
clrscr();
break;
case 2:
for(i=1;i<=10;i++)
{
//textcolor(i+1);
printf("\n\n\t\t\t\t[%ld]",i);
delay(500);
}
getch();
clrscr();
break;
case 3:
for(i=10;i>=1;i--)
{
//textcolor(i+1);
printf("\n\n\t\t\t\t[%ld]",i);
delay(500);
}
getch();
clrscr();
break;
case 4:
for(i=1;i<=50;i=i+2)
{
//textcolor(i+1);
printf("\n\n\t\t\t\t[%ld]",i);
delay(500);
}
getch();
clrscr();
break;
case 5:
for(i=2;i<=50;i=i+2)
{
//textcolor(i+1);
printf("\n\n\t\t\t\t[%ld]",i);
delay(500);
}
getch();
clrscr();
break;
case 6:
j=0;
for(i=1;i<=50;i++)
{
j=j+i;
}
printf("\n\n\t\t\t\t[%ld]",j);
getch();
clrscr();
break;
case 7:
j=0;
printf("\n\n\t\t\t\tEnter The Ending Number:->");
scanf("%ld",&no1);
for(i=1;i<=no1;i++)
{
j=j+i;
}
printf("\n\n\t\t\t\tThe Sum Of N Number [%ld]",j);
getch();
clrscr();
break;
case 8:
j=0;
printf("\n\n\t\t\t\tEnter Starting Number:->");
scanf("%ld",&no1);
printf("\n\n\t\t\t\tEnter Ending Number:->");
scanf("%ld",&no2);
for(i=no1;i<=no2;i++)
{
j=j+i;
}
//textcolor(3);
printf("\n\n\t\t\t\t[%ld]",j);
getch();
clrscr();
break;
case 9:
printf("\n\n\t\t\tEnter The Ending Number For Print Squre:->");
scanf("%ld",&no1);
for(i=1;i<=no1;i++)
{
j=i*i;
//textcolor(i);
printf("\n\n\t\t\t[%ld]=[%ld]",i,j);
delay(500);
}
getch();
clrscr();
break;
case 10:
printf("\n\n\t\t\tEnter The Ending Number For Print Squre:->");
scanf("%ld",&no1);
for(i=1;i<=no1;i++)
{
j=i*i*i;
//textcolor(i);
printf("\n\n\t\t\t[%ld]=[%ld]",i,j);
delay(500);
}
getch();
clrscr();
break;
case 11:
printf("\n\n\t\t\t\tEnter The Starting Year:->");
scanf("%ld",&no1);
printf("\n\n\t\t\t\tEnter The Ending Year:->");
scanf("%ld",&no2);
for(i=no1;i<=no2;i++)
{
if(i%4==0)
{
printf("\n\n\t\t\t\t[%ld]",i);
delay(500);
}
}
getch();
clrscr();
break;
default:
printf("\n\n\t\t\t\tPlease Enter Valid Choice..");
getch();
clrscr();
break;
}
}
while(ch9!=0);
//=======================FOR LOOP Complete================
//=======================WHILE LOOP Start=================
WHILE:
clrscr();
do
{
printf("\n\n\t\t\t**************************");
printf("\n\n\t\t\t******* WHILE LOOP *******");
printf("\n\n\t\t\t**************************");
printf("\n\n\n\n\n");
printf("\n\n\t\t\t 1:Print Ten Time HELLO");
printf("\n\n\t\t\t 2:Print The 1 To 10 Number");
printf("\n\n\t\t\t 3:Print The 10 To 1 Number.");
printf("\n\n\t\t\t 4:print The 1 To 50 Even Number.");
printf("\n\n\t\t\t 5:Print The 1 To 50 Odd Number.");
printf("\n\n\t\t\t 6:Print The Sum Of 50 Number.");
printf("\n\n\t\t\t 7:Print The Sum Of N number.");
printf("\n\n\t\t\t 8:Print The Sum Of M To N number.");
printf("\n\n\t\t\t 9:Print The Squre Table Of Given Number.");
printf("\n\n\t\t\t 10:print The Qube Table Of Given Number.");
printf("\n\n\t\t\t 11:Print The Leap Year Of N Year.");
printf("\n\n\t\t\t 12:Home Page");
printf("\n\n\t\t\t 13:Main Menu Of Loop");
printf("\n\n\t\t\t 14:Main Index");
printf("\n\n\t\t\t 0:EXIT");
printf("\n\n\t\t\t Select The Above Program:->");
scanf("%ld",&ch10);
if(ch10>=15)
{
printf("\n\n\n");
printf("\n\n\t\t\tPlease Select The Valid Option...!!!!");
getch();
clrscr();
goto WHILE;
}
if(ch10==12)
{
clrscr();
goto HOME;
}
if(ch10==13)
{
clrscr();
goto LOOP;
}
if(ch10==14)
{
clrscr();
goto FY;
}
if(ch10==0)
{
printf("\n\n\t\t\tAre You Want To Exit This Program...!!!");
printf("\n\n\t\t\tContinue For Press 1,Exit For Press 0 :->");
scanf("%ld",&ch1);
if(ch1==1)
{
clrscr();
goto WHILE;
}
else
{
exit(0);
}
}
switch(ch10)
{
case 1:
no1=1;
while(no1<=10)
{
// textcolor(5);
printf("\n\n\t\t\t\t[%ld] HELLO",no1);
no1=no1+1;
delay(700);
}
getch();
clrscr();
break;
case 2:
no1=1;
while(no1<=10)
{
//textcolor(2);
printf("\n\n\t\t\t\t[%ld]",no1);
no1=no1+1;
delay(700);
}
getch();
clrscr();
break;
case 3:
no1=10;
while(no1>=1)
{
//textcolor(3);
printf("\n\n\t\t\t\t[%ld]",no1);
no1=no1-1;
delay(700);
}
getch();
clrscr();
break;
case 4:
no1=2;
while(no1<=50)
{
//textcolor(6);
printf("\n\n\t\t\t\t[%ld]",no1);
no1=no1+2;
delay(500);
}
getch();
clrscr();
break;
case 5:
no1=1;
while(no1<=50)
{
//textcolor(7);
printf("\n\n\t\t\t\t[%ld]",no1);
no1=no1+2;
delay(400);
}
getch();
clrscr();
break;
case 6:
no1=1;
j=0;
while(no1<=50)
{
j=j+no1;
no1=no1+1;
}
printf("\n\n\t\t\t\tThe Sum Of 50 Number [%ld]",j);
getch();
clrscr();
break;
case 7:
no1=1;
j=0;
printf("\n\n\t\t\t\tEnter Last Number For Do The Sum:->");
scanf("%ld",&no2);
while(no1<=no2)
{
j=j+no1;
no1=no1+1;
}
//textcolor(8);
printf("\n\n\t\t\t\tThe Sum Of Given Number [%ld]",j);
getch();
clrscr();
break;
case 8:
j=0;
printf("\n\n\t\t\t\tEnter The Starting For Do The Sum:->");
scanf("%ld",&no1);
printf("\n\n\t\t\t\tEnter Ending Number For Do The Sum:->");
scanf("%ld",&no2);
while(no1<=no2)
{
j=j+no1;
no1=no1+1;
}
// textcolor(9);
printf("\n\n\t\t\t\tThe Sum Of Given Number [%ld]",j);
getch();
clrscr();
break;
case 9:
no1=1;
j=0;
printf("\n\n\t\t\t\tEnter Last Number For Print Squre:->");
scanf("%ld",&no2);
while(no1<=no2)
{
j=no1*no1;
no1=no1+1;
printf("\n\n\t\t\t\t[%ld] [%ld]",no1-1,j);
delay(700);
}
getch();
clrscr();
break;
case 10:
no1=1;
j=0;
printf("\n\n\t\t\t\tEnter Last Number For Print Qube:->");
scanf("%ld",&no2);
while(no1<=no2)
{
j=no1*no1*no1;
no1=no1+1;
printf("\n\n\t\t\t\t[%ld] [%ld]",no1-1,j);
delay(700);
}
getch();
clrscr();
break;
case 11:
printf("\n\n\t\t\t\tEnter The Starting Year:->");
scanf("%ld",&no1);
printf("\n\n\t\t\t\tEnter The Ending Year:->");
scanf("%ld",&no2);
while(no1<=no2)
{
if(no1%4==0)
{
printf("\n\n\t\t\t\t[%ld]",no1);
delay(600);
getch();
clrscr();
break;
}
no1=no1+1;
}
getch();
clrscr();
break;
}
}
while(ch10!=0);
//==========================WHILE LOOP Complete====================
//==========================DO WHILE LOOP Start====================
DOWHILE:
clrscr();
do
{
printf("\n\n\t\t\t**************************");
printf("\n\n\t\t\t******* DO...WHILE *******");
printf("\n\n\t\t\t**************************");
printf("\n\n\n\n\n");
printf("\n\n\t\t\t 1:Print Ten Time HELLO");
printf("\n\n\t\t\t 2:Print The 1 To 10 Number");
printf("\n\n\t\t\t 3:Print The 10 To 1 Number.");
printf("\n\n\t\t\t 4:print The 1 To 50 Even Number.");
printf("\n\n\t\t\t 5:Print The 1 To 50 Odd Number.");
printf("\n\n\t\t\t 6:Print The Sum Of 50 Number.");
printf("\n\n\t\t\t 7:Print The Sum Of N number.");
printf("\n\n\t\t\t 8:Print The Sum Of M To N number.");
printf("\n\n\t\t\t 9:Print The Squre Table Of Given Number.");
printf("\n\n\t\t\t 10:print The Qube Table Of Given Number.");
printf("\n\n\t\t\t 11:Print The Leap Year Of N Year.");
printf("\n\n\t\t\t 12:Home Page");
printf("\n\n\t\t\t 13:Main Menu Of Loop");
printf("\n\n\t\t\t 14:Main Index");
printf("\n\n\t\t\t 0:EXIT");
printf("\n\n\t\t\t Select The Above Program:->");
scanf("%ld",&ch11);
if(ch11>=15)
{
printf("\n\n\n");
printf("\n\n\t\t\tPlease Select The Valid Option...!!!!");
getch();
clrscr();
goto DOWHILE;
}
if(ch11==12)
{
clrscr();
goto HOME;
}
if(ch11==13)
{
clrscr();
goto LOOP;
}
if(ch11==14)
{
clrscr();
goto FY;
}
if(ch11==0)
{
printf("\n\n\t\t\tAre You Want To Exit This Program...!!!");
printf("\n\n\t\t\tContinue For Press 1,Exit For Press 0 :->");
scanf("%ld",&ch1);
if(ch1==1)
{
clrscr();
goto DOWHILE;
}
else
{
exit(0);
}
}
switch(ch11)
{
case 0:
exit(0);
case 1:
no1=1;
do
{
printf("\n\n\t\t\t\t[%ld] HELLO",no1);
delay(600);
no1=no1+1;
}
while(no1<=10);
getch();
clrscr();
break;
case 2:
no1=1;
do
{
printf("\n\n\t\t\t\t[%ld]",no1);
delay(600);
no1=no1+1;
}
while(no1<=10);
getch();
clrscr();
break;
case 3:
no1=10;
do
{
printf("\n\n\t\t\t\t[%ld]",no1);
delay(600);
no1=no1-1;
}
while(no1>=1);
getch();
clrscr();
break;
case 4:
no1=2;
do
{
printf("\n\n\t\t\t\t[%ld]",no1);
delay(600);
no1=no1+2;
}
while(no1<=50);
getch();
clrscr();
break;
case 5:
no1=1;
do
{
printf("\n\n\t\t\t\t[%ld]",no1);
delay(600);
no1=no1+2;
}
while(no1<=50);
getch();
clrscr();
break;
case 6:
no1=1;
j=0;
do
{
j=j+no1;
no1=no1+1;
}
while(no1<=50);
printf("\n\n\t\t\t\t[%ld]",j);
getch();
clrscr();
break;
case 7:
no1=1;
j=0;
printf("\n\n\t\t\t\tEnter The Ending Number For Print Sum:->");
scanf("%ld",&no2);
do
{
j=j+no1;
no1=no1+1;
}
while(no1<=no2);
printf("\n\n\t\t\t\t[%ld]",j);
getch();
clrscr();
break;
case 8:
j=0;
printf("\n\n\t\t\t\tEnter The Starting Number For Print Sum:->");
scanf("%ld",&no1);
printf("\n\n\t\t\t\tEnter The Ending Number For Print Sum:->");
scanf("%ld",&no2);
do
{
j=j+no1;
no1=no1+1;
}
while(no1<=no2);
printf("\n\n\t\t\t\t[%ld]",j);
getch();
clrscr();
break;
case 9:
no1=1;
j=0;
printf("\n\n\t\t\t\tEnter The Ending Number For Print Squre:->");
scanf("%ld",&no2);
do
{
printf("\n\n\t\t\t\t[%ld] [%ld]",no1-1,j);
delay(500);
j=no1*no1;
no1=no1+1;
}
while(no1<=no2+1);
getch();
clrscr();
break;
case 10:
no1=1;
j=0;
printf("\n\n\t\t\t\tEnter The Ending Number For Print Qube:->");
scanf("%ld",&no2);
do
{
printf("\n\n\t\t\t\t[%ld] [%ld]",no1-1,j);
delay(500);
j=no1*no1*no1;
no1=no1+1;
}
while(no1<=no2+1);
getch();
clrscr();
break;
case 11:
j=0;
printf("\n\n\t\t\t\tEnter The Starting Year:->");
scanf("%ld",&no1);
printf("\n\n\t\t\t\tEnter The Ending Year:->");
scanf("%ld",&no2);
do
{
if(no1%4==0)
{
printf("\n\n\t\t\t\t[%ld]",no1);
delay(500);
}
no1=no1+1;
}
while(no1<=no2);
getch();
clrscr();
break;
default:
printf("\n\n\t\t\t\tPlease Enter The Valid Choice...");
getch();
clrscr();
break;
}
}
while(ch11!=0);
//====================DO WHILE LOOP Complete=================
//====================ARRAY Starting=========================
ARRAY:
clrscr();
printf("\n\n\t\t\t**************************");
printf("\n\n\t\t\t********** ARRAY *********");
printf("\n\n\t\t\t**************************");
printf("\n\n\n\n\n");
printf("\n\n\t\t\t 1:->One Dimension Array");
printf("\n\n\t\t\t 2:->Two Dimension Array");
printf("\n\n\t\t\t 3:->Multi Dimension Array");
printf("\n\n\t\t\t 4:->Home Page");
printf("\n\n\t\t\t 5:->Sub Index");
printf("\n\n\t\t\t 6:->Main Index");
printf("\n\n\t\t\t 0:->EXIT");
printf("\n\n\t\t\t Select The Above Option:->");
scanf("%ld",&ch12);
if(ch12>=7)
{
printf("\n\n\n");
printf("\n\n\t\t\tPlease Select The Valid Option...!!!!");
getch();
clrscr();
goto ARRAY;
}
if(ch12==2)
{
goto TWOD;
}
if(ch12==3)
{
goto MULTID;
}
if(ch12==1)
{
goto ONED;
}
if(ch12==4)
{
clrscr();
goto HOME;
}
if(ch12==5)
{
clrscr();
goto NUMERIC;
}
if(ch12==6)
{
clrscr();
goto FY;
}
if(ch12==0)
{
printf("\n\n\t\t\tAre You Want To Exit This Program...!!!");
printf("\n\n\t\t\tContinue For Press 1,Exit For Press 0 :->");
scanf("%ld",&ch1);
if(ch1==1)
{
clrscr();
goto ARRAY;
}
else
{
exit(0);
}
}
//=====================ONE Dimension Start================
ONED:
clrscr();
printf("\n\n\t\t\t***************************");
printf("\n\n\t\t\t*** One Dimension Array ***");
printf("\n\n\t\t\t***************************");
printf("\n\n\n\n\n");
printf("\n\n\t\t\t 1:->Simple Program");
printf("\n\n\t\t\t 2:->Sorting Program");
printf("\n\n\t\t\t 3:->Searching Program");
printf("\n\n\t\t\t 4:->Home Page");
printf("\n\n\t\t\t 5:->Main Menu Of Array");
printf("\n\n\t\t\t 6:->Sub Index");
printf("\n\n\t\t\t 7:->Main Index");
printf("\n\n\t\t\t 0:->EXIT");
printf("\n\n\t\t\t Select The Above Option:->");
scanf("%ld",&ch13);
if(ch13>=8)
{
printf("\n\n\n");
printf("\n\n\t\t\tPlease Select The Valid Option...!!!!");
getch();
clrscr();
goto ONED;
}
if(ch13==3)
{
goto SEARCHING;
}
if(ch13==1)
{
goto SIMPLEONED;
}
if(ch13==2)
{
goto SORTING;
}
if(ch13==4)
{
clrscr();
goto HOME;
}
if(ch13==5)
{
clrscr();
goto ARRAY;
}
if(ch13==6)
{
clrscr();
goto NUMERIC;
}
if(ch13==7)
{
clrscr();
goto FY;
}
if(ch13==0)
{
printf("\n\n\t\t\tAre You Want To Exit This Program...!!!");
printf("\n\n\t\t\tContinue For Press 1,Exit For Press 0 :->");
scanf("%ld",&ch1);
if(ch1==1)
{
clrscr();
goto ONED;
}
else
{
exit(0);
}
}
SIMPLEONED:
clrscr();
do
{
printf("\n\n\t\t\t**************************");
printf("\n\n\t\t\t** One D Simple Program **");
printf("\n\n\t\t\t**************************");
printf("\n\n\n\n\n");
printf("\n\n\t\t\t 1:Enter Any Ten Number And Display It.");
printf("\n\n\t\t\t 2:Enter Any Ten Number And Display Reverse.");
printf("\n\n\t\t\t 3:Enter Any Ten Number And Display It Addition.");
printf("\n\n\t\t\t 4:Enter Any Ten Number And Display It Average.");
printf("\n\n\t\t\t 5:Enter Any Ten Number And Display Maximum No.");
printf("\n\n\t\t\t 6:Enter Any Ten Number And Display Minimum No.");
printf("\n\n\t\t\t 7:Home Page");
printf("\n\n\t\t\t 8:Main Menu Of Array.");
printf("\n\n\t\t\t 9:Main Menu Of One Dimension Array.");
printf("\n\n\t\t\t 10:Main Index.");
printf("\n\n\t\t\t 11:Sub Index.");
printf("\n\n\t\t\t 0:EXIT.");
printf("\n\n\t\t\t Select The Above Option:->");
scanf("%ld",&ch14);
if(ch14>=12)
{
printf("\n\n\n");
printf("\n\n\t\t\tPlease Select The Valid Option...!!!!");
getch();
clrscr();
goto SIMPLEONED;
}
if(ch14==7)
{
clrscr();
goto HOME;
}
if(ch14==8)
{
clrscr();
goto ARRAY;
}
if(ch14==9)
{
clrscr();
goto ONED;
}
if(ch14==10)
{
clrscr();
goto FY;
}
if(ch14==11)
{
clrscr();
goto NUMERIC;
}
if(ch14==0)
{
printf("\n\n\t\t\tAre You Want To Exit This Program...!!!");
printf("\n\n\t\t\tContinue For Press 1,Exit For Press 0 :->");
scanf("%ld",&ch1);
if(ch1==1)
{
clrscr();
goto SIMPLEONED;
}
else
{
exit(0);
}
}
switch(ch14)
{
case 1:
for(i=1;i<=10;i++)
{
printf("\n\n\t\t\tEnter The [%ld] Number:->",i);
scanf("%ld",&list[i]);
}
clrscr();
for(i=1;i<=10;i++)
{
printf("\n\n\t\t\tThe [%ld] Number Is = [%ld]",i,list[i]);
delay(600);
}
getch();
clrscr();
break;
case 2:
for(i=1;i<=10;i++)
{
printf("\n\n\t\t\tEnter The [%ld] Number:->",i);
scanf("%ld",&list[i]);
}
clrscr();
for(i=10;i>=1;i--)
{
printf("\n\n\t\t\tThe [%ld] Number Is = [%ld]",i,list[i]);
delay(600);
}
getch();
clrscr();
break;
case 3:
for(i=1;i<=10;i++)
{
printf("\n\n\t\t\tEnter The [%ld] Number:->",i);
scanf("%ld",&list[i]);
}
clrscr();
for(i=1;i<=10;i++)
{
tot=tot+list[i];
printf("\n\n\t\t\tThe [%ld] Number Is = [%ld]",i,list[i]);
delay(600);
}
printf("\n\n\t\t\tThe Total [%ld]",tot);
getch();
clrscr();
break;
case 4:
for(i=1;i<=10;i++)
{
printf("\n\n\t\t\tEnter The [%ld] Number:->",i);
scanf("%ld",&list[i]);
}
clrscr();
for(i=1;i<=10;i++)
{
tot=tot+list[i];
printf("\n\n\t\t\tThe [%ld] Number Is = [%ld]",i,list[i]);
delay(600);
}
printf("\n\n\t\t\tThe Total [%ld]",tot);
printf("\n\n\t\t\tThe Average [%ld]",tot/10);
getch();
clrscr();
break;
case 5:
printf("\n\n\t\t\tEnter How Many Element:->");
scanf("%ld",&n);
for(i=1;i<=n;i++)
{
printf("\n\n\t\t\tEnter The [%ld] Number:->",i);
scanf("%ld",&list[i]);
}
for(i=1;i<=n;i++)
{
if(tot<=list[i])
{
tot=list[i];
}
}
clrscr();
printf("\n\n\t\t\tThe Maximum Number [%ld]",tot);
getch();
clrscr();
break;
case 6:
printf("\n\n\t\t\tEnter How Many Element:->");
scanf("%ld",&n);
for(i=1;i<=n;i++)
{
printf("\n\n\t\t\tEnter The [%ld] Number:->",i);
scanf("%ld",&list[i]);
}
ds=list[0];
for(i=1;i<=n;i++)
{
if(ds>=list[i])
{
ds=list[i];
}
}
clrscr();
printf("\n\n\t\t\tThe Minimum Number [%ld]",ds);
getch();
clrscr();
break;
}
}
while(ch14!=0);
SORTING:
clrscr();
printf("\n\n\t\t\t***************************");
printf("\n\n\t\t\t***** Sorting Program *****");
printf("\n\n\t\t\t***************************");
printf("\n\n\n\n\n");
printf("\n\n\t\t\t 1:Bubble Sort.");
printf("\n\n\t\t\t 2:Selection Sort.");
printf("\n\n\t\t\t 3:Insertion Sort.");
printf("\n\n\t\t\t 4:Shell Sort.");
printf("\n\n\t\t\t 5:Home Page");
printf("\n\n\t\t\t 6:Main Menu Of One Dimension Array.");
printf("\n\n\t\t\t 7:Main Index.");
printf("\n\n\t\t\t 8:Sub Index.");
printf("\n\n\t\t\t 0:EXIT.");
printf("\n\n\t\t\t Select The Above Option:->");
scanf("%ld",&ch1);
if(ch1>=9)
{
printf("\n\n\n");
printf("\n\n\t\t\tPlease Select The Valid Option...!!!!");
getch();
clrscr();
goto SORTING;
}
if(ch1==3)
{
goto INSERTION;
}
if(ch1==4)
{
goto SHELL;
}
if(ch1==2)
{
goto SELECTION;
}
if(ch1==1)
{
goto BUBBLE;
}
if(ch1==5)
{
clrscr();
goto HOME;
}
if(ch1==6)
{
clrscr();
goto ONED;
}
if(ch1==7)
{
clrscr();
goto FY;
}
if(ch1==8)
{
clrscr();
goto NUMERIC;
}
if(ch1==0)
{
printf("\n\n\t\t\tAre You Want To Exit This Program...!!!");
printf("\n\n\t\t\tContinue For Press 1,Exit For Press 0 :->");
scanf("%ld",&ch1);
if(ch1==1)
{
clrscr();
goto SORTING;
}
else
{
exit(0);
}
}
BUBBLE:
clrscr();
do
{
printf("\n\n\t\t\t***************************");
printf("\n\n\t\t\t******* BUBBLE SORT *******");
printf("\n\n\t\t\t***************************");
printf("\n\n\n\n\n");
printf("\n\n\t\t\t 1:Ascending Program.");
printf("\n\n\t\t\t 2:Decending Program.");
printf("\n\n\t\t\t 3:Main Menu Of Sorting.");
printf("\n\n\t\t\t 0:EXIT");
printf("\n\n\t\t\t Select The Above Option:->");
scanf("%ld",&ch2);
if(ch2>=4)
{
printf("\n\n\n");
printf("\n\n\t\t\tPlease Select The Valid Option...!!!!");
getch();
clrscr();
goto BUBBLE;
}
if(ch2==3)
{
clrscr();
goto SORTING;
}
if(ch2==0)
{
printf("\n\n\t\t\tAre You Want To Exit This Program...!!!");
printf("\n\n\t\t\tContinue For Press 1,Exit For Press 0 :->");
scanf("%ld",&ch1);
if(ch1==1)
{
clrscr();
goto BUBBLE;
}
else
{
exit(0);
}
}
switch(ch2)
{
case 1:
for(i=1;i<=5;i++)
{
printf("\n\n\t\t\tEnter The [%ld] Number:->",i);
scanf("%ld",&list[i]);
}
for(i=1;i<=5;i++)
{
for(j=1;j<=5-1;j++)
{
if(list[j]>=list[j+1])
{
k=list[j+1];
list[j+1]=list[j];
list[j]=k;
}
}
}
printf("\n\n\t\t\tAscending Order");
for(i=1;i<=5;i++)
{
printf("\n\n\t\t\t[%ld]",list[i]);
delay(600);
}
getch();
clrscr();
break;
case 2:
for(i=1;i<=5;i++)
{
printf("\n\n\t\t\tEnter The [%ld] Number:->",i);
scanf("%ld",&list[i]);
}
for(i=1;i<=5;i++)
{
for(j=1;j<=5-1;j++)
{
if(list[j]<=list[j+1])
{
k=list[j+1];
list[j+1]=list[j];
list[j]=k;
}
}
}
printf("\n\n\t\t\tDecending Order");
for(i=1;i<=5;i++)
{
printf("\n\n\t\t\t[%ld]",list[i]);
delay(600);
}
getch();
clrscr();
break;
}
}
while(ch2!=0);
SELECTION:
clrscr();
do
{
printf("\n\n\t\t\t**************************");
printf("\n\n\t\t\t***** SELECTION SORT *****");
printf("\n\n\t\t\t**************************");
printf("\n\n\n\n\n");
printf("\n\n\t\t\t 1:Ascending Program.");
printf("\n\n\t\t\t 2:Decending Program.");
printf("\n\n\t\t\t 3:Main Menu Of Sorting.");
printf("\n\n\t\t\t 0:EXIT");
printf("\n\n\t\t\t Select The Above Option:->");
scanf("%ld",&ch3);
if(ch3>=4)
{
printf("\n\n\n");
printf("\n\n\t\t\tPlease Select The Valid Option...!!!!");
getch();
clrscr();
goto SELECTION;
}
if(ch3==3)
{
clrscr();
goto SORTING;
}
if(ch3==0)
{
printf("\n\n\t\t\tAre You Want To Exit This Program...!!!");
printf("\n\n\t\t\tContinue For Press 1,Exit For Press 0 :->");
scanf("%ld",&ch1);
if(ch1==1)
{
clrscr();
goto SELECTION;
}
else
{
exit(0);
}
}
switch(ch3)
{
case 1:
for(i=1;i<=5;i++)
{
printf("\n\n\t\t\tEnter The [%ld] Number:->",i);
scanf("%ld",&list[i]);
}
for(i=1;i<=5;i++)
{
for(j=i+1;j<=5;j++)
{
if(list[i]>=list[j])
{
k=list[i];
list[i]=list[j];
list[j]=k;
}
}
}
printf("\n\n\t\t\tAscending Order");
for(i=1;i<=5;i++)
{
printf("\n\n\t\t\t[%ld]",list[i]);
delay(600);
}
getch();
clrscr();
break;
case 2:
for(i=1;i<=5;i++)
{
printf("\n\n\t\t\tEnter The [%ld] Number:->",i);
scanf("%ld",&list[i]);
}
for(i=1;i<=5;i++)
{
for(j=i+1;j<=5;j++)
{
if(list[i]<=list[j])
{
k=list[i];
list[i]=list[j];
list[j]=k;
}
}
}
printf("\n\n\t\t\tDecending Order");
for(i=1;i<=5;i++)
{
printf("\n\n\t\t\t[%ld]",list[i]);
delay(600);
}
getch();
clrscr();
break;
}
}
while(ch3!=0);
INSERTION:
clrscr();
do
{
printf("\n\n\t\t\t**************************");
printf("\n\n\t\t\t***** INSERTION SORT *****");
printf("\n\n\t\t\t**************************");
printf("\n\n\n\n\n");
printf("\n\n\t\t\t 1:Ascending Program.");
printf("\n\n\t\t\t 2:Main Menu Of Sorting.");
printf("\n\n\t\t\t 0:EXIT");
printf("\n\n\t\t\t Select The Above Option:->");
scanf("%ld",&ch2);
if(ch2>=4)
{
printf("\n\n\n");
printf("\n\n\t\t\tPlease Select The Valid Option...!!!!");
getch();
clrscr();
goto INSERTION;
}
if(ch2==2)
{
clrscr();
goto SORTING;
}
if(ch2==0)
{
printf("\n\n\t\t\tAre You Want To Exit This Program...!!!");
printf("\n\n\t\t\tContinue For Press 1,Exit For Press 0 :->");
scanf("%ld",&ch1);
if(ch1==1)
{
clrscr();
goto INSERTION;
}
else
{
exit(0);
}
}
switch(ch2)
{
case 1:
printf("\n\n\t\t\tEnter Any Five Number:");
for(i=0;i<=4;i++)
{
printf("\n\n\t\t\tEnter The [%ld] Value:->",i+1);
scanf("%ld",&list[i]);
k=list[i];
pointer=i-1;
while(k<list[pointer])
{
list[pointer+1]=list[pointer];
list[pointer]=k;
pointer=pointer-1;
}
printf("\n\n\t\t\tAscending Order");
for(j=0;j<=i;j++)
{
printf("\n\n\t\t\t[%ld]",list[j]);
}
}
getch();
clrscr();
break;
}
}
while(ch2!=0);
SHELL:
clrscr();
do
{
printf("\n\n\t\t\t**************************");
printf("\n\n\t\t\t******* SHELL SORT *******");
printf("\n\n\t\t\t**************************");
printf("\n\n\n\n\n");
printf("\n\n\t\t\t 1:Ascending Program.");
printf("\n\n\t\t\t 2:Main Menu Of Sorting.");
printf("\n\n\t\t\t 0:EXIT");
printf("\n\n\t\t\t Select The Above Option:->");
scanf("%ld",&ch2);
if(ch2>=3)
{
printf("\n\n\n");
printf("\n\n\t\t\tPlease Select The Valid Option...!!!!");
getch();
clrscr();
goto SHELL;
}
if(ch2==2)
{
clrscr();
goto SORTING;
}
if(ch2==0)
{
printf("\n\n\t\t\tAre You Want To Exit This Program...!!!");
printf("\n\n\t\t\tContinue For Press 1,Exit For Press 0 :->");
scanf("%ld",&ch1);
if(ch1==1)
{
clrscr();
goto SHELL;
}
else
{
exit(0);
}
}
switch(ch2)
{
case 1:
printf("\n\n\t\t\tEnter How Many Element:->");
scanf("%ld",&size);
for(i=0;i<=size;i++)
{
printf("\n\n\t\t\tEnter [%ld] Number:->",i);
scanf("%ld",&list[i]);
}
dist=size/2;
while(dist)
{
do
{
swap=0;
for(i=0;i<=(size-dist);i++)
{
if(list[i]>list[i+dist])
{
temp=list[i];
list[i]=list[i+dist];
list[i+dist]=temp;
swap=1;
}
}
}
while(swap);
dist=dist/2;
}
printf("\n\n\t\t\tAscending Order");
for(i=0;i<=size;i++)
{
printf("\n\n\t\t\t[%ld]",list[i]);
delay(700);
}
getch();
clrscr();
break;
case 2:
printf("\n\n\t\t\tEnter How Many Element:->");
scanf("%ld",&size);
for(i=0;i<=size;i++)
{
printf("\n\n\t\t\tEnter [%ld] Number:->",i);
scanf("%ld",&list[i]);
}
dist=size/2;
while(dist)
{
do
{
swap=0;
for(i=0;i<=(size-dist);i++)
{
if(list[i]<list[i+dist])
{
temp=list[i];
list[i]=list[i+dist];
list[i+dist]=temp;
swap=1;
}
}
}
while(swap);
dist=dist/2;
}
printf("\n\n\t\t\tDecending Order");
for(i=0;i<=size;i++)
{
printf("\n\n\t\t\t[%ld]",list[i]);
delay(700);
}
getch();
clrscr();
break;
}
}
while(ch2!=0);
//=============================SORTING Complete====================
//=============================SEARCHING Start=====================
SEARCHING:
clrscr();
do
{
printf("\n\n\t\t\t*****************************");
printf("\n\n\t\t\t***** SEARCHING PROGRAM *****");
printf("\n\n\t\t\t*****************************");
printf("\n\n\n\n\n");
printf("\n\n\t\t\t 1:Linear Or Sequential Searching Program");
printf("\n\n\t\t\t 2:Binary Searching Program");
printf("\n\n\t\t\t 3:Home Page");
printf("\n\n\t\t\t 4:Main Menu Of One Dimension Array.");
printf("\n\n\t\t\t 5:Main Index.");
printf("\n\n\t\t\t 6:Sub Index.");
printf("\n\n\t\t\t 0:EXIT.");
printf("\n\n\t\t\t Select The Above Option:->");
scanf("%ld",&ch1);
if(ch1>=7)
{
printf("\n\n\n");
printf("\n\n\t\t\tPlease Select The Valid Option...!!!!");
getch();
clrscr();
goto SEARCHING;
}
if(ch1==3)
{
clrscr();
goto HOME;
}
if(ch1==4)
{
clrscr();
goto ONED;
}
if(ch1==5)
{
clrscr();
goto FY;
}
if(ch1==6)
{
clrscr();
goto NUMERIC;
}
if(ch1==0)
{
printf("\n\n\t\t\tAre You Want To Exit This Program...!!!");
printf("\n\n\t\t\tContinue For Press 1,Exit For Press 0 :->");
scanf("%ld",&ch1);
if(ch1==1)
{
clrscr();
goto SEARCHING;
}
else
{
exit(0);
}
}
switch(ch1)
{
case 1:
printf("\n\n\t\t\tEnter How Many Element:->");
scanf("%ld",&n);
for(i=1;i<=n;i++)
{
printf("\n\n\t\t\tEnter The [%ld] Element",i);
scanf("%ld",&list[i]);
}
clrscr();
printf("\n\n\t\t\tEnter Element For Search:->");
scanf("%ld",&a);
for(i=1;i<=n;i++)
{
if(list[i]==a)
{
tot=1;
}
printf("\n\n\t\t\tThe [%ld] Element is :-> [%ld]",i,list[i]);
}
if(tot==1)
{
printf("\n\n\t\t\tThe Element [%ld] Is Found",a);
}
else
{
printf("\n\n\t\t\tThe Element [%ld] Is Not Found",a);
}
getch();
clrscr();
break;
case 2:
printf("\n\n\t\t\tEnter The How Many Element:->");
scanf("%ld",&n);
for(i=1;i<=n;i++)
{
printf("\n\n\t\t\tEnter The [%ld] Element:->",i);
scanf("%ld",&list[i]);
}
for(i=1;i<=n;i++)
{
for(j=i+1;j<=n;j++)
{
if(list[i]>=list[j])
{
temp=list[i];
list[i]=list[j];
list[j]=temp;
}
}
}
printf("Enter the element for search:");
scanf("%ld",&element);
low=0;
high=n-1;
flag=1;
while(low<=high)
{
mid=(low+high)/2;
if(element<list[mid])
high=mid-1;
else if(element>list[mid])
low=mid+1;
else if(list[mid]==element)
{
printf("\n\n\t\t\tElement [%ld] Found",element);
flag=0;
break;
}
}
if(flag)
printf("\n\n\t\t\tElement [%ld] Not Found",element);
getch();
clrscr();
break;
}
}
while(ch1!=0);
//=========================ONE D Array Complete=====================
//=========================TWO D Array Start========================
TWOD:
clrscr();
printf("\n\n\t\t\t*******************************");
printf("\n\n\t\t\t***** TWO Dimension ARRAY *****");
printf("\n\n\t\t\t*******************************");
printf("\n\n\n\n\n");
printf("\n\n\t\t\t 1:->2X2 Matrix");
printf("\n\n\t\t\t 2:->3X3 Matrix");
printf("\n\n\t\t\t 3:->Home Page");
printf("\n\n\t\t\t 4:->Main Menu Of Array");
printf("\n\n\t\t\t 5:->Main Index");
printf("\n\n\t\t\t 6:->Sub Index");
printf("\n\n\t\t\t 0:->Exit");
printf("\n\n\t\t\t Select The Above Option:->");
scanf("%ld",&ch1);
if(ch1>=7)
{
printf("\n\n\n");
printf("\n\n\t\t\tPlease Select The Valid Option...!!!!");
getch();
clrscr();
goto TWOD;
}
if(ch1==3)
{
clrscr();
goto HOME;
}
if(ch1==2)
{
goto THREETHREE;
}
if(ch1==4)
{
clrscr();
goto ARRAY;
}
if(ch1==5)
{
clrscr();
goto FY;
}
if(ch1==6)
{
clrscr();
goto NUMERIC;
}
if(ch1==0)
{
printf("\n\n\t\t\tAre You Want To Exit This Program...!!!");
printf("\n\n\t\t\tContinue For Press 1,Exit For Press 0 :->");
scanf("%ld",&ch1);
if(ch1==1)
{
clrscr();
goto TWOD;
}
else
{
exit(0);
}
}
if(ch1==1)
{
goto TWOTWO;
}
TWOTWO:
clrscr();
do
{
printf("\n\n\t\t\t*******************************");
printf("\n\n\t\t\t**** TWO DIMENSION PROGRAM ****");
printf("\n\n\t\t\t*******************************");
printf("\n\n\n\n\n");
printf("\n\n\t\t\t 1:Enter Any 2X2 Matrix And Display It");
printf("\n\n\t\t\t 2:Enter Any 2X2 Matrix And Display It Transpose");
printf("\n\n\t\t\t 3:Enter Any Two 2X2 Matrix And Display It");
printf("\n\n\t\t\t 4:Enter Any Two 2X2 Matrix And Display Addition");
printf("\n\n\t\t\t 5:Enter Any Two 2X2 Matrix And Display Substraction");
printf("\n\n\t\t\t 6:Enter Any Two 2X2 Matrix And Display Multiplication");
printf("\n\n\t\t\t 7:Main Menu Of Two Dimension Array");
printf("\n\n\t\t\t 8:Main Menu Of Array");
printf("\n\n\t\t\t 9:Home Page");
printf("\n\n\t\t\t 0:EXIT");
printf("\n\n\t\t\t Select The Above Option:->");
scanf("%ld",&ch1);
if(ch1>=10)
{
printf("\n\n\n");
printf("\n\n\t\t\tPlease Select The Valid Option...!!!!");
getch();
clrscr();
goto TWOTWO;
}
if(ch1==7)
{
clrscr();
goto TWOD;
}
if(ch1==8)
{
clrscr();
goto ARRAY;
}
if(ch1==9)
{
clrscr();
goto HOME;
}
if(ch1==0)
{
printf("\n\n\t\t\tAre You Want To Exit This Program...!!!");
printf("\n\n\t\t\tContinue For Press 1,Exit For Press 0 :->");
scanf("%ld",&ch1);
if(ch1==1)
{
clrscr();
goto TWOTWO;
}
else
{
exit(0);
}
}
switch(ch1)
{
case 1:
printf("\n\n\t\t\tEnter Any 2X2 Matrix:\n");
for(i=0;i<=1;i++)
{
for(j=0;j<=1;j++)
{
printf("\n\n\t\t\tEnter [%ld] [%ld] Value:->",i,j);
scanf("%ld",&m1[i][j]);
}
}
printf("\n\n\n**********************");
printf("\n\nThe 2X2 Matrix:\n");
printf("\n\n");
for(i=0;i<=1;i++)
{
for(j=0;j<=1;j++)
{
printf("%ld",m1[i][j]);
}
printf("\n");
}
printf("\n**********************");
getch();
clrscr();
break;
case 2:
printf("\n\n\t\t\tEnter Any 2X2 Matrix Fo Transpose:\n");
for(i=0;i<=1;i++)
{
for(j=0;j<=1;j++)
{
printf("\n\n\t\t\tEnter [%ld] [%ld] Value:->",i,j);
scanf("%ld",&m1[i][j]);
}
}
printf("\n\n\n**********************");
printf("\n\nThe 2X2 Transpose Matrix:\n");
printf("\n\n");
for(i=0;i<=1;i++)
{
for(j=0;j<=1;j++)
{
printf("%ld",m1[j][i]);
}
printf("\n");
}
printf("\n**********************");
getch();
clrscr();
break;
case 3:
printf("\n\n\t\t\tEnter Any First 2X2 Matrix:\n");
for(i=0;i<=1;i++)
{
for(j=0;j<=1;j++)
{
printf("\n\n\t\t\tEnter [%ld] [%ld] Value:->",i,j);
scanf("%ld",&m1[i][j]);
}
}
printf("\n\n\t\t\tEnter Any Second 2X2 Matrix:\n");
for(i=0;i<=1;i++)
{
for(j=0;j<=1;j++)
{
printf("\n\n\t\t\tEnter [%ld] [%ld] Value:->",i,j);
scanf("%ld",&m2[i][j]);
}
}
printf("\n\n\n**********************");
printf("\n\nThe First 2X2 Matrix:\n");
printf("\n\n");
for(i=0;i<=1;i++)
{
for(j=0;j<=1;j++)
{
printf("%ld",m1[i][j]);
}
printf("\n");
}
printf("\n\nThe Second 2X2 Matrix:\n");
printf("\n\n");
for(i=0;i<=1;i++)
{
for(j=0;j<=1;j++)
{
printf("%ld",m2[i][j]);
}
printf("\n");
}
printf("\n**********************");
getch();
clrscr();
break;
case 4:
printf("\n\n\t\t\tEnter Any First 2X2 Matrix:\n");
for(i=0;i<=1;i++)
{
for(j=0;j<=1;j++)
{
printf("\n\n\t\t\tEnter [%ld] [%ld] Value:->",i,j);
scanf("%ld",&m1[i][j]);
}
}
clrscr();
printf("\n\n\t\t\tEnter Any Second 2X2 Matrix:\n");
for(i=0;i<=1;i++)
{
for(j=0;j<=1;j++)
{
printf("\n\n\t\t\tEnter [%ld] [%ld] Value:->",i,j);
scanf("%ld",&m2[i][j]);
}
}
clrscr();
printf("\n\n\n**********************");
printf("\n\nThe First 2X2 Matrix:\n");
printf("\n\n");
for(i=0;i<=1;i++)
{
for(j=0;j<=1;j++)
{
printf("[%ld]",m1[i][j]);
}
printf("\n");
}
printf("\n\nThe Second 2X2 Matrix:\n");
printf("\n\n");
for(i=0;i<=1;i++)
{
for(j=0;j<=1;j++)
{
printf("[%ld]",m2[i][j]);
}
printf("\n");
}
printf("\n\nThe Addition Of Two 2X2 Matrix:\n");
printf("\n\n");
for(i=0;i<=1;i++)
{
for(j=0;j<=1;j++)
{
printf("[%ld]",m1[i][j]+m2[i][j]);
}
printf("\n");
}
printf("\n**********************");
getch();
clrscr();
break;
case 5:
printf("\n\n\t\t\tEnter Any First 2X2 Matrix:\n");
for(i=0;i<=1;i++)
{
for(j=0;j<=1;j++)
{
printf("\n\n\t\t\tEnter [%ld] [%ld] Value:->",i,j);
scanf("%ld",&m1[i][j]);
}
}
clrscr();
printf("\n\n\t\t\tEnter Any Second 2X2 Matrix:\n");
for(i=0;i<=1;i++)
{
for(j=0;j<=1;j++)
{
printf("\n\n\t\t\tEnter [%ld] [%ld] Value:->",i,j);
scanf("%ld",&m2[i][j]);
}
}
clrscr();
printf("\n\n\n**********************");
printf("\n\nThe First 2X2 Matrix:\n");
printf("\n\n");
for(i=0;i<=1;i++)
{
for(j=0;j<=1;j++)
{
printf("[%ld]",m1[i][j]);
}
printf("\n");
}
printf("\n\nThe Second 2X2 Matrix:\n");
printf("\n\n");
for(i=0;i<=1;i++)
{
for(j=0;j<=1;j++)
{
printf("[%ld]",m2[i][j]);
}
printf("\n");
}
printf("\n\nThe Substarction Of Two 2X2 Matrix:\n");
printf("\n\n");
for(i=0;i<=1;i++)
{
for(j=0;j<=1;j++)
{
printf("[%ld]",m1[i][j]-m2[i][j]);
}
printf("\n");
}
printf("\n**********************");
getch();
clrscr();
break;
case 6:
printf("\n\n\t\t\tEnter Any First 2X2 Matrix:\n");
for(i=0;i<=1;i++)
{
for(j=0;j<=1;j++)
{
printf("\n\n\t\t\tEnter [%ld] [%ld] Value:->",i,j);
scanf("%ld",&m1[i][j]);
}
}
clrscr();
printf("\n\n\t\t\tEnter Any Second 2X2 Matrix:\n");
for(i=0;i<=1;i++)
{
for(j=0;j<=1;j++)
{
printf("\n\n\t\t\tEnter [%ld] [%ld] Value:->",i,j);
scanf("%ld",&m2[i][j]);
}
}
clrscr();
printf("\n\n\n**********************");
printf("\n\nThe First 2X2 Matrix:\n");
printf("\n\n");
for(i=0;i<=1;i++)
{
for(j=0;j<=1;j++)
{
printf("[%ld]",m1[i][j]);
}
printf("\n");
}
printf("\n\nThe Second 2X2 Matrix:\n");
printf("\n\n");
for(i=0;i<=1;i++)
{
for(j=0;j<=1;j++)
{
printf("[%ld]",m2[i][j]);
}
printf("\n");
}
for(i=0;i<=1;i++)
{
for(j=0;j<=1;j++)
{
tot=0;
for(k=0;k<=1;k++)
{
tot=tot+m1[i][k]*m2[k][j];
}
m3[i][j]=tot;
}
}
printf("\n\nMultiplication Of Two 2X2 Matrix:\n");
printf("\n\n");
for(i=0;i<=1;i++)
{
for(j=0;j<=1;j++)
{
printf("[%ld]",m3[i][j]);
}
printf("\n");
}
printf("\n**********************");
getch();
clrscr();
break;
}
}
while(ch1!=0);
THREETHREE:
clrscr();
do
{
printf("\n\n\t\t\t*******************************");
printf("\n\n\t\t\t*** THREE DIMENSION PROGRAM ***");
printf("\n\n\t\t\t*******************************");
printf("\n\n\n\n\n");
printf("\n\n\t\t\t 1:Enter Any 3X3 Matrix And Display It");
printf("\n\n\t\t\t 2:Enter Any 3X3 Matrix And Display It Transpose");
printf("\n\n\t\t\t 3:Enter Any Two 3X3 Matrix And Display It");
printf("\n\n\t\t\t 4:Enter Any Two 3X3 Matrix And Display Addition");
printf("\n\n\t\t\t 5:Enter Any Two 3X3 Matrix And Display Substraction");
printf("\n\n\t\t\t 6:Enter Any Two 3X3 Matrix And Display Multiplication");
printf("\n\n\t\t\t 7:Main Menu Of Two Dimension Array");
printf("\n\n\t\t\t 8:Main Menu Of Array");
printf("\n\n\t\t\t 9:Home Page");
printf("\n\n\t\t\t 0:EXIT");
printf("\n\n\t\t\t Select The Above Option:->");
scanf("%ld",&ch1);
if(ch1>=10)
{
printf("\n\n\n");
printf("\n\n\t\t\tPlease Select The Valid Option...!!!!");
getch();
clrscr();
goto THREETHREE;
}
if(ch1==7)
{
clrscr();
goto TWOD;
}
if(ch1==8)
{
clrscr();
goto ARRAY;
}
if(ch1==9)
{
clrscr();
goto HOME;
}
if(ch1==0)
{
printf("\n\n\t\t\tAre You Want To Exit This Program...!!!");
printf("\n\n\t\t\tContinue For Press 1,Exit For Press 0 :->");
scanf("%ld",&ch1);
if(ch1==1)
{
clrscr();
goto THREETHREE;
}
else
{
exit(0);
}
}
switch(ch1)
{
case 1:
printf("\n\n\t\t\tEnter Any 3X3 Matrix:\n");
for(i=0;i<=2;i++)
{
for(j=0;j<=2;j++)
{
printf("\n\n\t\t\tEnter [%ld] [%ld] Value:->",i,j);
scanf("%ld",&mn1[i][j]);
}
}
printf("\n\n\n**********************");
printf("\n\nThe 3X3 Matrix:\n");
printf("\n\n");
for(i=0;i<=2;i++)
{
for(j=0;j<=2;j++)
{
printf("%ld",mn1[i][j]);
}
printf("\n");
}
printf("\n**********************");
getch();
clrscr();
break;
case 2:
printf("\n\n\t\t\tEnter Any 3X3 Matrix Fo Transpose:\n");
for(i=0;i<=2;i++)
{
for(j=0;j<=2;j++)
{
printf("\n\n\t\t\tEnter [%ld] [%ld] Value:->",i,j);
scanf("%ld",&mn1[i][j]);
}
}
printf("\n\n\n**********************");
printf("\n\nThe 3X3 Transpose Matrix:\n");
printf("\n\n");
for(i=0;i<=2;i++)
{
for(j=0;j<=2;j++)
{
printf("[%ld]",mn1[j][i]);
}
printf("\n");
}
printf("\n**********************");
getch();
clrscr();
break;
case 3:
printf("\n\n\t\t\tEnter Any First 3X3 Matrix:\n");
for(i=0;i<=2;i++)
{
for(j=0;j<=2;j++)
{
printf("\n\n\t\t\tEnter [%ld] [%ld] Value:->",i,j);
scanf("%ld",&mn1[i][j]);
}
}
clrscr();
printf("\n\n\t\t\tEnter Any Second 3X3 Matrix:\n");
for(i=0;i<=2;i++)
{
for(j=0;j<=2;j++)
{
printf("\n\n\t\t\tEnter [%ld] [%ld] Value:->",i,j);
scanf("%ld",&mn2[i][j]);
}
}
clrscr();
printf("\n\n\n**********************");
printf("\n\nThe First 3X3 Matrix:\n");
printf("\n\n");
for(i=0;i<=2;i++)
{
for(j=0;j<=2;j++)
{
printf("[%ld]",mn1[i][j]);
}
printf("\n");
}
printf("\n\nThe Second 3X3 Matrix:\n");
printf("\n\n");
for(i=0;i<=2;i++)
{
for(j=0;j<=2;j++)
{
printf("[%ld]",mn2[i][j]);
}
printf("\n");
}
printf("\n**********************");
getch();
clrscr();
break;
case 4:
printf("\n\n\t\t\tEnter Any First 3X3 Matrix:\n");
for(i=0;i<=2;i++)
{
for(j=0;j<=2;j++)
{
printf("\n\n\t\t\tEnter [%ld] [%ld] Value:->",i,j);
scanf("%ld",&mn1[i][j]);
}
}
clrscr();
printf("\n\n\t\t\tEnter Any Second 3X3 Matrix:\n");
for(i=0;i<=2;i++)
{
for(j=0;j<=2;j++)
{
printf("\n\n\t\t\tEnter [%ld] [%ld] Value:->",i,j);
scanf("%ld",&mn2[i][j]);
}
}
clrscr();
printf("\n\n\n**********************");
printf("\n\nThe First 3X3 Matrix:\n");
printf("\n\n");
for(i=0;i<=2;i++)
{
for(j=0;j<=2;j++)
{
printf("[%ld]",mn1[i][j]);
}
printf("\n");
}
printf("\n\nThe Second 3X3 Matrix:\n");
printf("\n\n");
for(i=0;i<=2;i++)
{
for(j=0;j<=2;j++)
{
printf("[%ld]",mn2[i][j]);
}
printf("\n");
}
printf("\n\nThe Addition Of Two 3X3 Matrix:\n");
printf("\n\n");
for(i=0;i<=2;i++)
{
for(j=0;j<=2;j++)
{
printf("[%ld]",mn1[i][j]+mn2[i][j]);
}
printf("\n");
}
printf("\n**********************");
getch();
clrscr();
break;
case 5:
printf("\n\n\t\t\tEnter Any First 3X3 Matrix:\n");
for(i=0;i<=2;i++)
{
for(j=0;j<=2;j++)
{
printf("\n\n\t\t\tEnter [%ld] [%ld] Value:->",i,j);
scanf("%ld",&mn1[i][j]);
}
}
clrscr();
printf("\n\n\t\t\tEnter Any Second 3X3 Matrix:\n");
for(i=0;i<=2;i++)
{
for(j=0;j<=2;j++)
{
printf("\n\n\t\t\tEnter [%ld] [%ld] Value:->",i,j);
scanf("%ld",&mn2[i][j]);
}
}
clrscr();
printf("\n\n\n**********************");
printf("\n\nThe First 3X3 Matrix:\n");
printf("\n\n");
for(i=0;i<=2;i++)
{
for(j=0;j<=2;j++)
{
printf("[%ld]",mn1[i][j]);
}
printf("\n");
}
printf("\n\nThe Second 3X3 Matrix:\n");
printf("\n\n");
for(i=0;i<=2;i++)
{
for(j=0;j<=2;j++)
{
printf("[%ld]",mn2[i][j]);
}
printf("\n");
}
printf("\n\nThe Substarction Of Two 3X3 Matrix:\n");
printf("\n\n");
for(i=0;i<=2;i++)
{
for(j=0;j<=2;j++)
{
printf("[%ld]",mn1[i][j]-mn2[i][j]);
}
printf("\n");
}
printf("\n**********************");
getch();
clrscr();
break;
case 6:
printf("\n\n\t\t\tEnter Any First 3X3 Matrix:\n");
for(i=0;i<=2;i++)
{
for(j=0;j<=2;j++)
{
printf("\n\n\t\t\tEnter [%ld] [%ld] Value:->",i,j);
scanf("%ld",&mn1[i][j]);
}
}
clrscr();
printf("\n\n\t\t\tEnter Any Second 3X3 Matrix:\n");
for(i=0;i<=2;i++)
{
for(j=0;j<=2;j++)
{
printf("\n\n\t\t\tEnter [%ld] [%ld] Value:->",i,j);
scanf("%ld",&mn2[i][j]);
}
}
clrscr();
printf("\n\n\n**********************");
printf("\n\nThe First 3X3 Matrix:\n");
printf("\n\n");
for(i=0;i<=2;i++)
{
for(j=0;j<=2;j++)
{
printf("[%ld]",mn1[i][j]);
}
printf("\n");
}
printf("\n\nThe Second 3X3 Matrix:\n");
printf("\n\n");
for(i=0;i<=2;i++)
{
for(j=0;j<=2;j++)
{
printf("[%ld]",mn2[i][j]);
}
printf("\n");
}
for(i=0;i<=2;i++)
{
for(j=0;j<=2;j++)
{
tot=0;
for(k=0;k<=2;k++)
{
tot=tot+mn1[i][k]*mn2[k][j];
}
mn3[i][j]=tot;
}
}
printf("\n\nMultiplication Of Two 3X3 Matrix:\n");
printf("\n\n");
for(i=0;i<=2;i++)
{
for(j=0;j<=2;j++)
{
printf("[%ld]",mn3[i][j]);
}
printf("\n");
}
printf("\n**********************");
getch();
clrscr();
break;
}
}
while(ch1!=0);
//===================TWO Dimension Complete====================
//===================Multidimension Start======================
MULTID:
clrscr();
do
{
printf("\n\n\t\t\t*******************************");
printf("\n\n\t\t\t*** MULTI DIMENSION PROGRAM ***");
printf("\n\n\t\t\t*******************************");
printf("\n\n\n\n\n");
printf("\n\n\t\t 1:To Enter 2X2X2 Multidimension Array And Display It");
printf("\n\n\t\t 2:To Enter 3X3X3 Multidimension Array And Display");
printf("\n\n\t\t 3:Main Menu Of Array");
printf("\n\n\t\t 4:Home Page");
printf("\n\n\t\t 0:Exit");
printf("\n\n\t\t Select The Above Option:->");
scanf("%ld",&ch1);
if(ch1>=5)
{
printf("\n\n\n");
printf("\n\n\t\t\tPlease Select The Valid Option...!!!!");
getch();
clrscr();
goto MULTID;
}
if(ch1==3)
{
clrscr();
goto ARRAY;
}
if(ch1==4)
{
clrscr();
goto HOME;
}
if(ch1==0)
{
printf("\n\n\t\t\tAre You Want To Exit This Program...!!!");
printf("\n\n\t\t\tContinue For Press 1,Exit For Press 0 :->");
scanf("%ld",&ch1);
if(ch1==1)
{
clrscr();
goto MULTID;
}
else
{
exit(0);
}
}
switch(ch1)
{
case 1:
printf("\n\n\t\t\tEnter Any 2X2X2 Matrix:\n");
for(i=0;i<=1;i++)
{
for(j=0;j<=1;j++)
{
for(k=0;k<=1;k++)
{
printf("\n\n\t\t\tEnter [%ld] [%ld] [%ld] Value:->",i,j,k);
scanf("%ld",&mt1[i][j][k]);
}
}
}
clrscr();
printf("\n\n\n**********************");
printf("\n\nThe 2X2X2 Matrix:\n");
printf("\n\n");
for(i=0;i<=1;i++)
{
for(j=0;j<=1;j++)
{
for(k=0;k<=1;k++)
{
printf("[%ld]",mt1[i][j][k]);
}
}
printf("\n");
}
printf("\n**********************");
getch();
clrscr();
break;
case 2:
printf("\n\n\t\t\tEnter Any 2X2X2 Matrix:\n");
for(i=0;i<=2;i++)
{
for(j=0;j<=2;j++)
{
for(k=0;k<=2;k++)
{
printf("\n\n\t\t\tEnter [%ld] [%ld] [%ld] Value:->",i,j,k);
scanf("%ld",&t1[i][j][k]);
}
}
}
clrscr();
printf("\n\n\n**********************");
printf("\n\nThe 3X3X3 Matrix:\n");
printf("\n\n");
for(i=0;i<=2;i++)
{
for(j=0;j<=2;j++)
{
for(k=0;k<=2;k++)
{
printf("[%ld]",t1[i][j][k]);
}
}
printf("\n");
}
printf("\n**********************");
getch();
clrscr();
break;
}
}
while(ch1!=0);
//===================Complete ARRAY====================
//==================Structure Starting=================
STRUCTURE:
clrscr();
printf("\n\n\t\t\t*****************************");
printf("\n\n\t\t\t***** STRUCTURE PROGRAM *****");
printf("\n\n\t\t\t*****************************");
printf("\n\n\n\n\n");
printf("\n\n\t\t\t 1:->Simple Program Of Structure");
printf("\n\n\t\t\t 2:->Multi Structure Program");
printf("\n\n\t\t\t 4:->Main Index");
printf("\n\n\t\t\t 5:->Sub Index");
printf("\n\n\t\t\t 6:->Home Page");
printf("\n\n\t\t\t 0:->EXIT");
printf("\n\n\t\t\t Select The Above Option:->");
scanf("%ld",&ch1);
if(ch1==2)
{
goto MULTISTRUCT;
}
if(ch1==6)
{
clrscr();
goto HOME;
}
if(ch1>=7)
{
printf("\n\n\t\t\t\tPlease Select The Valid Option...!!!");
getch();
clrscr();
goto STRUCTURE;
}
if(ch1==4)
{
clrscr();
goto FY;
}
if(ch==5)
{
clrscr();
goto NUMERIC;
}
if(ch1==0)
{
printf("\n\n\t\t\tAre You Want To Exit This Program...!!!");
printf("\n\n\t\t\tContinue For Press 1,Exit For Press 0 :->");
scanf("%ld",&ch1);
if(ch1==1)
{
clrscr();
goto STRUCTURE;
}
else
{
exit(0);
}
}
if(ch1==1)
{
goto SIMPLESTRUCT;
}
SIMPLESTRUCT:
clrscr();
do
{
printf("\n\n\t\t\t********************************");
printf("\n\n\t\t\t*** SIMPLE STRUCTURE PROGRAM ***");
printf("\n\n\t\t\t********************************");
printf("\n\n\n\n\n");
printf("\n\n\t\t\t 1:Enter Employee No,Name,Salay And Display");
printf("\n\n\t\t\t 2:Enter Student Name,No,College Name And Display");
printf("\n\n\t\t\t 3:Enter Student Name,Roll No,Three Subject Marks And");
printf("\n\n\t\t\t Display Total,Persentage,Class");
printf("\n\n\t\t\t 4:Home Page");
printf("\n\n\t\t\t 5:Main Index");
printf("\n\n\t\t\t 6:Sub Index");
printf("\n\n\t\t\t 7:Main Menu Of Structor");
printf("\n\n\t\t\t 0:EXIT");
printf("\n\n\t\t\t Select The Above Option:->");
scanf("%ld",&ch1);
if(ch1==7)
{
clrscr();
goto STRUCTURE;
}
if(ch1>=8)
{
printf("\n\n\t\t\t\tPlease Select The Valid Option...!!!");
getch();
clrscr();
goto SIMPLESTRUCT;
}
if(ch1==4)
{
clrscr();
goto HOME;
}
if(ch1==5)
{
clrscr();
goto FY;
}
if(ch1==6)
{
clrscr();
goto NUMERIC;
}
if(ch1==0)
{
printf("\n\n\t\t\tAre You Want To Exit This Program...!!!");
printf("\n\n\t\t\tContinue For Press 1,Exit For Press 0 :->");
scanf("%ld",&ch1);
if(ch1==1)
{
clrscr();
goto SIMPLESTRUCT;
}
else
{
exit(0);
}
}
switch(ch1)
{
case 1:
{
struct emp e;
printf("\n\n\t\t\tEnter The Employee Number:->");
scanf("%ld",&e.no);
printf("\n\n\t\t\tEnter The Employee Name:->");
scanf("%s",&e.name);
printf("\n\n\t\t\tEnter The Employee Salary:->");
scanf("%ld",&e.salary);
clrscr();
printf("\n\n\t\t\t************************************");
printf("\n\n\t\t\t\tEmployee Detail");
printf("\n\n\t\t\t************************************");
printf("\n\n\n");
printf("\n\n\t\t\t\tEmployee Number:->%ld",e.no);
printf("\n\n\t\t\t\tEmployee Name :->%s",e.name);
printf("\n\n\t\t\t\tEmployee Salary:->%ld",e.salary);
printf("\n\n\n");
printf("\n\n\t\t\t************************************");
}
getch();
clrscr();
break;
case 2:
{
struct emp e;
printf("\n\n\t\t\tEnter The Student Number:->");
scanf("%ld",&e.no);
printf("\n\n\t\t\tEnter The Student Name:->");
scanf("%s",&e.name);
printf("\n\n\t\t\tEnter The College Name:->");
scanf("%s",&e.name1);
clrscr();
printf("\n\n\t\t\t************************************");
printf("\n\n\t\t\t\tStudent Detail");
printf("\n\n\t\t\t************************************");
printf("\n\n\n");
printf("\n\n\t\t\tStudent Number:->%ld",e.no);
printf("\n\n\t\t\tStudent Name :->%s",e.name);
printf("\n\n\t\t\tCollege Name :->%s",e.name1);
printf("\n\n\t\t\t************************************");
}
getch();
clrscr();
break;
case 3:
{
struct emp e;
printf("\n\n\t\t\tEnter The Student Roll Number:->");
scanf("%ld",&e.no);
printf("\n\n\t\t\tEnter The Student Name:->");
scanf("%s",&e.name);
printf("\n\n\t\t\tEnter The College Name:->");
scanf("%s",&e.name1);
printf("\n\n\t\t\tEnter First Subject Marks:->");
scanf("%f",&e.s1);
printf("\n\n\t\t\tEnter The Second Subject Marks:->");
scanf("%f",&e.s2);
printf("\n\n\t\t\tEnter The Third Subject Marks:->");
scanf("%f",&e.s3);
e.tot=e.s1+e.s2+e.s3;
e.per=e.tot/3;
clrscr();
printf("\n\n\t\t\t************************************");
printf("\n\n\t\t\t\tStudent Detail");
printf("\n\n\t\t\t************************************");
printf("\n\n\n");
printf("\n\n\t\t\tStudent Number :->%ld",e.no);
printf("\n\n\t\t\tStudent Name :->%s",e.name);
printf("\n\n\t\t\tCollege Name :->%s",e.name1);
printf("\n\n\t\t\tFirst Subject :->%f",e.s1);
printf("\n\n\t\t\tSecond Subject :->%f",e.s2);
printf("\n\n\t\t\tThird Subject :->%f",e.s3);
printf("\n\n\t\t\tThe Total :->%ld",e.tot);
printf("\n\n\t\t\tThe Persentage :->%f",e.per);
printf("\n\n\t\t\tThe Class :->");
if(e.per>=70)
{
printf("Distiction");
}
else if(e.per>=60)
{
printf("First");
}
else if(e.per>=50)
{
printf("Second");
}
else if(e.per>=40)
{
printf("Pass");
}
else
{
printf("Fail");
}
printf("\n\n\t\t\t************************************");
}
getch();
clrscr();
break;
}
}
while(ch1!=0);
MULTISTRUCT:
clrscr();
do
{
printf("\n\n\t\t\t*********************************");
printf("\n\n\t\t\t**** MULTI STRUCTURE PROGRAM ****");
printf("\n\n\t\t\t*********************************");
printf("\n\n\n\n\n");
printf("\n\n\t\t 1:Enter Student Name,Number,College Name,Three Subject Marks");
printf("\n\n\t\t And Display Total,persentage");
printf("\n\n\t\t 2:Enter Customer Name,Id,Rupee,A/c Type And Display It");
printf("\n\n\t\t 3:Main Menu Of Structure");
printf("\n\n\t\t 4:Home Page");
printf("\n\n\t\t 0:EXIT");
printf("\n\n\t\t Select The Above Option:->");
scanf("%ld",&ch1);
if(ch1>=5)
{
printf("\n\n\t\t\tPlease Select The Valid Option...!!!");
getch();
clrscr();
goto MULTISTRUCT;
}
if(ch1==3)
{
clrscr();
goto STRUCTURE;
}
if(ch1==4)
{
clrscr();
goto HOME;
}
if(ch1==0)
{
printf("\n\n\t\t\tAre You Want To Exit This Program...!!!");
printf("\n\n\t\t\tContinue For Press 1,Exit For Press 0 :->");
scanf("%ld",&ch1);
if(ch1==1)
{
clrscr();
goto MULTISTRUCT;
}
else
{
exit(0);
}
}
switch(ch1)
{
case 1:
{
struct student st1;
struct subject su1;
printf("\n\n\t\t\tEnter Student Number:->");
scanf("%ld",&st1.no);
printf("\n\n\t\t\tEnter Student Name:->");
scanf("%s",&st1.na1);
printf("\n\n\t\t\tEnter College Name:->");
scanf("%s",&st1.na2);
printf("\n\n\t\t\tEnter First Subject Marks:->");
scanf("%ld",&st1.su1.s1);
printf("\n\n\t\t\tEnter Second Subject Marks:->");
scanf("%ld",&st1.su1.s2);
printf("\n\n\t\t\tEnter Third Subject Marks:->");
scanf("%ld",&st1.su1.s3);
st1.su1.tot=st1.su1.s1+st1.su1.s2+st1.su1.s3;
st1.su1.per=st1.su1.tot/3;
clrscr();
printf("\n\n\t\t\t************************************");
printf("\n\n\t\t\t\tStudent Result Detail");
printf("\n\n\t\t\t************************************");
printf("\n\n\n");
printf("\n\n\t\t\tStudent Number :->%ld",st1.no);
printf("\n\n\t\t\tStudent Name :->%s",st1.na1);
printf("\n\n\t\t\tCollege Name :->%s",st1.na2);
printf("\n\n\t\t\tFirst Subject :->%ld",st1.su1.s1);
printf("\n\n\t\t\tSecond Subject :->%ld",st1.su1.s2);
printf("\n\n\t\t\tThird Subject :->%ld",st1.su1.s3);
printf("\n\n\t\t\tThe Total :->%ld",st1.su1.tot);
printf("\n\n\t\t\tThe Persentage :->%f",st1.su1.per);
printf("\n\n\t\t\tThe Class :->");
if(st1.su1.per>=70)
{
printf("Distiction");
}
else if(st1.su1.per>=60)
{
printf("First");
}
else if(st1.su1.per>=50)
{
printf("Second");
}
else if(st1.su1.per>=40)
{
printf("Pass");
}
else
{
printf("Fail");
}
printf("\n\n\t\t\t************************************");
}
getch();
clrscr();
break;
case 2:
{
struct student st1;
struct subject su1;
printf("\n\n\t\t\tEnter Customer ID:->");
scanf("%ld",&st1.id);
printf("\n\n\t\t\tEnter Customer Name:->");
scanf("%s",&st1.na);
printf("\n\n\t\t\tEnter Acount Type:->");
scanf("%s",&st1.ac);
printf("\n\n\t\t\tEnter Total Rupee:->");
scanf("%f",&st1.su1.rupee);
clrscr();
printf("\n\n\t\t\t************************************");
printf("\n\n\t\t\t\tCustomer Account Detail");
printf("\n\n\t\t\t************************************");
printf("\n\n\n");
printf("\n\n\t\t\tCustomer ID :->%ld",st1.id);
printf("\n\n\t\t\tCustomer Name :->%s",st1.na);
printf("\n\n\t\t\tAccount Type :->%s",st1.ac);
printf("\n\n\t\t\tTotal Rupee :->%f",st1.su1.rupee);
printf("\n\n\t\t\t************************************");
}
getch();
clrscr();
break;
}
}
while(ch1!=0);
//====================MULTI Structer Complete==================
EXIT:
exit(0);
while(ch1!=0);
}
#include<conio.h>
struct emp
{
long int no,a,b,c,d,e,salary,tot;
char name[30],name1[30];
float i,j,n,s1,s2,s3,per;
}e;
struct student
{
long int no,id;
char na[30],na1[30],na2[30],ac[30];
float a,b,c,d,e;
struct subject
{
long int s1,s2,s3,s4,s5;
long int tot;
float per,rupee;
}su1;
}st1;
struct stud
{
long int no[14],tot,m[6];
char nam[30],nam1[30];
float per;
}s[6];
void main()
{
long int ch,ch1,ch3,ch2,ch4,ch5,ch6,ch7,ch8,ch9,ch10,ch11,ch12,ch13,ch14,ch15,a,b,c,d,e,f,g,h,i,j,k,l,m,n,no1,no2,no3;
long int list1[1000],list[1000],list2[1000],list3[1000],list4[1000],tot=0,pointer=0,swap,dist,size,temp,low,high,mid,flag,element;
long int m1[2][2],m2[2][2],m3[2][2],mn1[3][3],mn2[3][3],mn3[3][3],mt1[2][2][2],mt2[2][2][2];
long int t1[3][3][3],t2[3][3][3],s,ds=0;
char name;
clrscr();
HOME:
clrscr();
textcolor(2);
printf("\n");
printf("\n\n\t\t\t **************************");
printf("\n\n\t\t\t WellCome To The BCA Helper");
printf("\n\n\t\t\t **************************");
printf("\n\n");
printf("\n\n\t\t\t\tPrepaid by VIVEK");
printf("\n\n\t\t\t\tBCA SEM-3");
printf("\n\n\t\t\t\tCollege: SSCCS");
printf("\n\n\t\t\t\tMO: 9638331246");
printf("\n\n\t\t\t\tGuidance : Bharat Makwana");
printf("\n\n\n\n\n");
printf("\n\n\t\t\t\t***************");
printf("\n\n\t\t\t\t1:->FY B.C.A");
printf("\n\n\t\t\t\t2:->SY B.C.A");
printf("\n\n\t\t\t\t3:->TY B.C.A");
printf("\n\n\t\t\t\t0:->EXIT");
printf("\n\n\t\t\t\t***************");
printf("\n\n\n\t\t\t\tSelect The Above Option:->");
scanf("%ld",&a);
if(a==3)
{
printf("\n\n\n\n\n\n\n\n");
printf("\n\n\t\t\t*************************************");
printf("\n\n\t\t\tT.Y.BCA Programs Will Comming Soon,");
printf("\n\n\t\t\tSo Please Wait For A Few Months...VIVEK");
printf("\n\n\t\t\t*************************************");
getch();
clrscr();
goto HOME;
}
if(a==2)
{
printf("\n\n\n\n\n\n\n\n");
printf("\n\n\t\t\t*************************************");
printf("\n\n\t\t\tS.Y.BCA Programs Will Comming Soon,");
printf("\n\n\t\t\tSo Please Wait For A Few Days...VIVEK");
printf("\n\n\t\t\t*************************************");
getch();
clrscr();
goto HOME;
}
if(a>3)
{
printf("\n\n\t\t\t\t");
printf("Please Select Valid Option...!!!!");
getch();
clrscr();
goto HOME;
}
else
{
if(a==1)
{
goto FY;
}
else if(a==0)
{
printf("\n\n\t\t\tAre You Want To Exit This Program...!!!");
printf("\n\n\t\t\tContinue For Press 1,Exit For Press 0 :->");
scanf("%ld",&ch1);
if(ch1>1)
{
printf("\n\n\t\t\tPlease Enter The Valid Option...VIVEK");
getch();
clrscr();
goto HOME;
}
else
{
if(ch1==1)
{
clrscr();
goto HOME;
}
else
{
goto EXIT;
}
}
}
}
//===============FY Start==============
FY:
// clrscr();
// textcolor(2);
clrscr();
printf("\n\n\t\t\t**************************");
printf("\n\n\t\t\t******* Main Index *******");
printf("\n\n\t\t\t**************************");
printf("\n\n\n\n\n");
printf("\n\n\t\t\t 1:->Numeric Program");
printf("\n\n\t\t\t 2:->Home Page");
printf("\n\n\t\t\t 0:->Exit");
printf("\n\n\n\t\t\t Select The Above Option:->");
scanf("%ld",&ch1);
if(ch1>=3)
{
printf("\n\n\t\t\tPlease Select The Valid Option..!!!!");
getch();
clrscr();
goto FY;
}
if(ch1==1)
{
goto NUMERIC;
}
if(ch1==2)
{
clrscr();
goto HOME;
}
if(ch1==0)
{
printf("\n\n\t\t\tAre You Want To Exit This Program...!!!");
printf("\n\n\t\t\tContinue For Press 1,Exit For Press 0 :->");
scanf("%ld",&ch1);
if(ch1>1)
{
printf("\n\n\t\t\tPlease Enter The Valid Option...VIVEK");
getch();
clrscr();
goto FY;;
}
else
{
if(ch1==1)
{
clrscr();
goto FY;
}
else
{
exit(0);
}
}
}
//===================END FY===============
//===================NUMERIC START=========
NUMERIC:
clrscr();
printf("\n\n\t\t\t**************************");
printf("\n\n\t\t\t******* Sub Index *******");
printf("\n\n\t\t\t**************************");
printf("\n\n\n\n\n");
printf("\n\n\t\t\t 1:->Simple Program");
printf("\n\n\t\t\t 2:->IF Condition");
printf("\n\n\t\t\t 3:->LOOP Program");
printf("\n\n\t\t\t 4:->ARRY Program");
printf("\n\n\t\t\t 5:->STRUCTURE Program");
printf("\n\n\t\t\t 6:->Home Page");
printf("\n\n\t\t\t 7:->Main Index");
printf("\n\n\t\t\t 0:->EXIT");
printf("\n\n\t\t\t Select The Above Option:->");
scanf("%ld",&ch2);
if(ch2==5)
{
goto STRUCTURE;
}
if(ch2>=8)
{
printf("\n\n\n");
printf("\n\n\t\t\tPlease Select The Valid Option...!!!!");
getch();
clrscr();
goto NUMERIC;
}
if(ch2==1)
{
goto SIMPLE;
}
if(ch2==2)
{
goto IF;
}
if(ch2==3)
{
goto LOOP;
}
if(ch2==4)
{
goto ARRAY;
}
if(ch2==6)
{
clrscr();
goto HOME;
}
if(ch2==7)
{
clrscr();
goto FY;
}
if(ch2==0)
{
printf("\n\n\t\t\tAre You Want To Exit This Program...!!!");
printf("\n\n\t\t\tContinue For Press 1,Exit For Press 0 :->");
scanf("%ld",&ch1);
if(ch1>1)
{
printf("\n\n\t\t\tPlease Enter The Valid Option...VIVEK");
getch();
clrscr();
goto NUMERIC;
}
else
{
if(ch1==1)
{
clrscr();
goto NUMERIC;
}
else
{
exit(0);
}
}
}
//================NUMERIC END=============
//================SIMPLE STARTING=========
SIMPLE:
clrscr();
do
{
printf("\n\n\t\t\t*********************************");
printf("\n\n\t\t\t******** SIMPLE PROGRAM *********");
printf("\n\n\t\t\t*********************************");
printf("\n\n");
printf("\n\n\t\t\t 1:Enter Your Name And Display It.");
printf("\n\n\t\t\t 2:Enter Your Address And Display It");
printf("\n\n\t\t\t 3:Enter Your Address And Display Center.");
printf("\n\n\t\t\t 4:Enter Any Number And Display It.");
printf("\n\n\t\t\t 5:Enter Two Number And Display It.");
printf("\n\n\t\t\t 6:Enter Two Number And Display Addition.");
printf("\n\n\t\t\t 7:Enter Two Number And Display Arithmatic Operation.");
printf("\n\n\t\t\t 8:Enter Value In METER And Display Kilometer.");
printf("\n\n\t\t\t 9:Enter Value In Kilometer And Display Meter.");
printf("\n\n\t\t\t 10:To Find Out Simple Interest.");
printf("\n\n\t\t\t 11:Enter One Value And Find QUBE.");
printf("\n\n\t\t\t 12:Enter One Value And Find SQUARE.");
printf("\n\n\t\t\t 13:Enter Value Celsius And Find Feranhit Value.");
printf("\n\n\t\t\t 14:Enter Meter Value And Find KM As Well As Meter.");
printf("\n\n\t\t\t 15:Enter Value Kilogram And Display In Gram.");
printf("\n\n\t\t\t 16:Enter Value Ton And Display In Kilogram.");
printf("\n\n\t\t\t 17:Home Page\t18:Sub Index\t19:Main Index\t0:EXIT");
printf("\n\n\n\t\t\t Select The Above Option:->");
scanf("%ld",&ch3);
if(ch3>=20)
{
printf("\n\n\n");
printf("\n\n\t\t\tPlease Select The Valid Option...!!!!");
getch();
clrscr();
goto SIMPLE;
}
if(ch3==17)
{
clrscr();
goto HOME;
}
if(ch3==18)
{
clrscr();
goto NUMERIC;
}
if(ch3==19)
{
clrscr();
goto FY;
}
if(ch3==0)
{
printf("\n\n\t\t\tAre You Want To Exit This Program...!!!");
printf("\n\n\t\t\tContinue For Press 1,Exit For Press 0 :->");
scanf("%ld",&ch1);
if(ch1>1)
{
printf("\n\n\t\t\tPlease Enter The Valid Option...VIVEK");
getch();
clrscr();
goto SIMPLE;
}
else
{
if(ch1==1)
{
clrscr();
goto SIMPLE;
}
else
{
exit(0);
}
}
}
switch(ch3)
{
case 1:
printf("\n\n\t\tEnter Your Name:->");
scanf("%s",name);
printf("\n\n\t\tYour Name Is:->%s",name);
getch();
clrscr();
break;
case 2:
printf("\n\n\t\t**********************");
printf("\n\n\t\tName: Vivek");
printf("\n\n\t\tVillage: Jaliya Manaji");
printf("\n\n\t\tTahshil: Palitana");
printf("\n\n\t\tDistrict:Bhavnagar");
printf("\n\n\t\t**********************");
getch();
clrscr();
break;
case 3:
printf("\n\n\t\t\t\t*********************");
printf("\n\n\t\t\t\tName: Vivek");
printf("\n\n\t\t\t\tVillage: Jaliya Manaji");
printf("\n\n\t\t\t\tTahshil: Palitana");
printf("\n\n\t\t\t\tDistrict:Bhavnagar");
printf("\n\n\t\t\t\t*********************");
getch();
clrscr();
break;
case 4:
printf("\n\t\tEnter Any One Number:->");
scanf("%ld",&a);
printf("\n\n\t\t****************************");
printf("\n\n\t\tThe Entered Number Is [%ld]",a);
printf("\n\n\t\t****************************");
getch();
clrscr();
break;
case 5:
printf("\n\t\tEnter The First Number:->");
scanf("%ld",&no1);
printf("\n\t\tEnter The Second Number:->");
scanf("%ld",&no2);
printf("\n\n\t\t******************************");
printf("\n\n\t\tThe First Number Is [%ld]",no1);
printf("\n\n\t\tThe Second Number Is [%ld]",no2);
printf("\n\n\t\t******************************");
getch();
clrscr();
break;
case 6:
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\tEnter The First Number:->");
scanf("%ld",&no1);
printf("\n\t\t\t\tEnter The Second Number:->");
scanf("%ld",&no2);
c=no1+no2;
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\t***********************************");
printf("\n\n\t\t\t\tThe Addition Of Two Number [%ld]",c);
printf("\n\n\t\t\t\t***********************************");
getch();
clrscr();
break;
case 7:
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\tEnter The First Number:->");
scanf("%ld",&no1);
printf("\n\t\t\t\tEnter The Second Number:->");
scanf("%ld",&no2);
a=no1+no2;
b=no1-no2;
c=no1*no2;
d=no1/no2;
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\t***********************************");
printf("\n\n\t\t\t\tThe Addition Of Two Number [%ld]",a);
printf("\n\n\t\t\t\tThe Substraction Of Two Number [%ld]",b);
printf("\n\n\t\t\t\tThe Multiplication Of Two Number[%ld]",c);
printf("\n\n\t\t\t\tThe Division Of Two Number [%ld]",d);
printf("\n\n\t\t\t\t***********************************");
getch();
clrscr();
break;
case 8:
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\tEnter Value In Meter:->");
scanf("%ld",&no1);
c=no1/1000;
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\t***********************************");
printf("\n\n\t\t\t\tThe Kilometer Value [%ld]",c);
printf("\n\n\t\t\t\t***********************************");
getch();
clrscr();
break;
case 9:
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\tEnter Value In Kilometer:->");
scanf("%ld",&no1);
c=no1*1000;
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\t***********************************");
printf("\n\n\t\t\t\tThe Meter Value [%ld]",c);
printf("\n\n\t\t\t\t***********************************");
getch();
clrscr();
break;
case 10:
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\tEnter The Total Amount:->");
scanf("%ld",&no1);
printf("\n\n\t\t\t\tEnter The Duration In Year:->");
scanf("%ld",&no2);
printf("\n\n\t\t\t\tEnter The Rate:->");
scanf("%ld",&no3);
a=no1*no2*no3;
b=a/100;
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\t***********************************");
printf("\n\n\t\t\t\tThe Simple Interest Is [%ld]",b);
printf("\n\n\t\t\t\t***********************************");
getch();
clrscr();
break;
case 11:
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\tEnter Number For Find Qube:->");
scanf("%ld",&no1);
c=no1*no1*no1;
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\t***********************************");
printf("\n\n\t\t\t\tThe Qube Of Given Number [%ld]",c);
printf("\n\n\t\t\t\t***********************************");
getch();
clrscr();
break;
case 12:
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\tEnter Number For Find Squre:->");
scanf("%ld",&no1);
c=no1*no1;
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\t***********************************");
printf("\n\n\t\t\t\tThe Squre Of Given Number [%ld]",c);
printf("\n\n\t\t\t\t***********************************");
getch();
clrscr();
break;
case 13:
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\tEnter Value In Celcius:->");
scanf("%ld",&no1);
c=no1*1.8;
a=c+32;
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\t***********************************");
printf("\n\n\t\t\t\tThe Feranhit Value Is [%ld]",a);
printf("\n\n\t\t\t\t***********************************");
getch();
clrscr();
break;
case 14:
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\tEnter Value In Meter:->");
scanf("%ld",&no1);
a=no1/1000;
b=no1%1000;
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\t***********************************");
printf("\n\n\t\t\t\tThe Kilometer Value [%ld]",a);
printf("\n\n\t\t\t\tThe Meter Value [%ld]",b);
printf("\n\n\t\t\t\t***********************************");
getch();
clrscr();
break;
case 15:
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\tEnter Value In Kilogram:->");
scanf("%ld",&no1);
a=no1*1000;
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\t***********************************");
printf("\n\n\t\t\t\tThe Gram Value Is [%ld]",a);
printf("\n\n\t\t\t\t***********************************");
getch();
clrscr();
break;
case 16:
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\tEnter Value In Tone:->");
scanf("%ld",&no1);
a=no1*1000;
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\t***********************************");
printf("\n\n\t\t\t\tThe Kilogram Value Is [%ld]",a);
printf("\n\n\t\t\t\t***********************************");
getch();
clrscr();
break;
}
}
while(ch3!=0);
//===================IF Starting================
IF:
clrscr();
printf("\n\n\t\t\t**************************");
printf("\n\n\t\t\t****** IF Condition ******");
printf("\n\n\t\t\t**************************");
printf("\n\n\n\n\n");
printf("\n\n\t\t\t 1:->Simple IF Program");
printf("\n\n\t\t\t 2:->IF..ELSE Program");
printf("\n\n\t\t\t 3:->ElSE..IF Program");
printf("\n\n\t\t\t 4:->Home Page");
printf("\n\n\t\t\t 5:->Sub Index");
printf("\n\n\t\t\t 6:->Main Index");
printf("\n\n\t\t\t 0:->EXIT");
printf("\n\n\t\t\t Select The Above Option:->");
scanf("%ld",&ch4);
if(ch4>=7)
{
printf("\n\n\n");
printf("\n\n\t\t\tPlease Select The Valid Option...!!!!");
getch();
clrscr();
goto IF;
}
if(ch4==5)
{
clrscr();
goto NUMERIC;
}
if(ch4==6)
{
clrscr();
goto FY;
}
if(ch4==1)
{
goto SIMPLEIF;
}
if(ch4==2)
{
goto IFELSE;
}
if(ch4==3)
{
goto ELSEIF;
}
if(ch4==4)
{
clrscr();
goto HOME;
}
if(ch4==0)
{
printf("\n\n\t\t\tAre You Want To Exit This Program...!!!");
printf("\n\n\t\t\tContinue For Press 1,Exit For Press 0 :->");
scanf("%ld",&ch1);
if(ch1>1)
{
printf("\n\n\t\t\tPlease Enter The Valid Option...VIVEK");
getch();
clrscr();
goto IF;
}
else
{
if(ch1==1)
{
clrscr();
goto IF;
}
else
{
exit(0);
}
}
}
//==========SIMPLEIF Starting==================
SIMPLEIF:
clrscr();
do
{
printf("\n\n\t\t\t**************************");
printf("\n\n\t\t\t******* IF Program *******");
printf("\n\n\t\t\t**************************");
printf("\n\n\n\n\n");
printf("\n\n\t\t\t 1:If Number Greatre Then 40 Pass.");
printf("\n\n\t\t\t 2:If Number Less Then 40 Fail.");
printf("\n\n\t\t\t 3:If Number == 50 Then Display Saibaba.");
printf("\n\n\t\t\t 4:Check Number Is ODD.");
printf("\n\n\t\t\t 5:Check Number Is EVEN.");
printf("\n\n\t\t\t 6:Check Year Is Leap Year.");
printf("\n\n\t\t\t 7:Check Entered Number is Greater Then 1000.");
printf("\n\n\t\t\t 8:Check Entered Number is Less Then 1000.");
printf("\n\n\t\t\t 9:Check Entered Number Is Less Then 0.");
printf("\n\n\t\t\t 10:Check Entered Number==10,Print VIVEK.");
printf("\n\n\t\t\t 11:Main Menu Of IF Condition");
printf("\n\n\t\t\t 12:Home Page");
printf("\n\n\t\t\t 0:EXIT");
printf("\n\n\t\t\t Select The Above Program:->");
scanf("%ld",&ch5);
if(ch5>=13)
{
printf("\n\n\n");
printf("\n\n\t\t\tPlease Select The Valid Option...!!!!");
getch();
clrscr();
goto SIMPLE;
}
if(ch5==12)
{
clrscr();
goto HOME;
}
if(ch5==11)
{
clrscr();
goto IF;
}
if(ch5==0)
{
printf("\n\n\t\t\tAre You Want To Exit This Program...!!!");
printf("\n\n\t\t\tContinue For Press 1,Exit For Press 0 :->");
scanf("%ld",&ch1);
if(ch1==1)
{
clrscr();
goto SIMPLEIF;
}
else
{
exit(0);
}
}
switch(ch5)
{
case 1:
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\tEnter Any Number:->");
scanf("%ld",&no1);
if(no1>=40)
{
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\t***********************************");
printf("\n\n\t\t\t\tThe [%ld] Number Is Greater Then 40",no1);
printf("\n\n\t\t\t\t***********************************");
}
getch();
clrscr();
break;
case 2:
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\tEnter Any Number:->");
scanf("%ld",&no1);
if(no1<=40)
{
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\t***********************************");
printf("\n\n\t\t\t\tThe [%ld] Number Is Less Then 40",no1);
printf("\n\n\t\t\t\t***********************************");
}
getch();
clrscr();
break;
case 3:
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\tEnter Number 50 For Display Saibaba:->");
scanf("%ld",&no1);
if(no1==50)
{
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\t***********************************");
printf("\n\n\t\t\t\tThe [%ld] Number Is == 50 Saibaba",no1);
printf("\n\n\t\t\t\t***********************************");
}
getch();
clrscr();
break;
case 4:
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\tEnter Any Number For Check ODD:->");
scanf("%ld",&no1);
if(no1%2==1)
{
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\t***********************************");
printf("\n\n\t\t\t\tThe [%ld] Number Is ODD",no1);
printf("\n\n\t\t\t\t***********************************");
}
getch();
clrscr();
break;
case 5:
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\tEnter Any Number For Check EVEN:->");
scanf("%ld",&no1);
if(no1%2==0)
{
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\t***********************************");
printf("\n\n\t\t\t\tThe [%ld] Number Is EVEN",no1);
printf("\n\n\t\t\t\t***********************************");
}
getch();
clrscr();
break;
case 6:
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\tEnter Any Year For Check Leap Year:->");
scanf("%ld",&no1);
if(no1%4==0)
{
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\t***********************************");
printf("\n\n\t\t\t\tThe [%ld] Year Is Leap",no1);
printf("\n\n\t\t\t\t***********************************");
}
getch();
clrscr();
break;
case 7:
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\tEnter Any Number For Check Greater Then 1000:->");
scanf("%ld",&no1);
if(no1>=1000)
{
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\t***********************************");
printf("\n\n\t\t\t\tThe [%ld] Number Is Greater Then 1000",no1);
printf("\n\n\t\t\t\t***********************************");
}
getch();
clrscr();
break;
case 8:
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\tEnter Any Number For Check Less Then 1000:->");
scanf("%ld",&no1);
if(no1<=1000)
{
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\t***********************************");
printf("\n\n\t\t\t\tThe [%ld] Number Is Less Then 1000",no1);
printf("\n\n\t\t\t\t***********************************");
}
getch();
clrscr();
break;
case 9:
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\tEnter Any Number For Check Less Then 0:->");
scanf("%ld",&no1);
if(no1<=0)
{
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\t***********************************");
printf("\n\n\t\t\t\tThe [%ld] Number Is Less Then 0",no1);
printf("\n\n\t\t\t\t***********************************");
}
getch();
clrscr();
break;
case 10:
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\tEnter Any Number 10 For Print VIVEK:->");
scanf("%ld",&no1);
if(no1==10)
{
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\t***********************************");
printf("\n\n\t\t\t\tThe [%ld] Number == 10 So,Vivek",no1);
printf("\n\n\t\t\t\t***********************************");
}
getch();
clrscr();
break;
}
}
while(ch5!=0);
//========================SIMPLEIF Complete===================
IFELSE:
clrscr();
do
{
printf("\n\n\t\t\t**************************");
printf("\n\n\t\t\t******** IF..ELSE ********");
printf("\n\n\t\t\t**************************");
printf("\n\n\n");
printf("\n\n\t\t1:If Marks Greater 40 Then Pass OtherWise Fail.");
printf("\n\n\t\t2:Enter Any One Number And Check Odd Or Even.");
printf("\n\n\t\t3:Enter Any One Year And Check Leap Year OR Not.");
printf("\n\n\t\t4:Enter Any Two Number And Display Maximum Number.");
printf("\n\n\t\t5:Enter Any Two Number And Display Minimum Number.");
printf("\n\n\t\t6:If Number Greater 50 Then Display VIVEK Otherwise CHAVDA.");
printf("\n\n\t\t7:Enter Only Three Digit Number And Display 1 And 2 Digit Sum.");
printf("\n\n\t\t8:Enter Only Three Digit Number And Display 1 And 3 Digit Sum.");
printf("\n\n\t\t9:Enter Any One Number And Check Positive OR Negative Number.");
printf("\n\n\t\t10:Enter Any One Number And Check Single Digit Or Double Digit.");
printf("\n\n\t\t11:Home Page");
printf("\n\n\t\t12:Main Index Of IF Condition");
printf("\n\n\t\t13:Main Index");
printf("\n\n\t\t0:EXIT");
printf("\n\n\t\tSelect The Above Program:->");
scanf("%ld",&ch6);
if(ch6>=14)
{
printf("\n\n\n");
printf("\n\n\t\t\tPlease Select The Valid Option...!!!!");
getch();
clrscr();
goto IFELSE;
}
if(ch6==11)
{
clrscr();
goto HOME;
}
if(ch6==12)
{
clrscr();
goto IF;
}
if(ch6==13)
{
clrscr();
goto FY;
}
if(ch6==0)
{
printf("\n\n\t\t\tAre You Want To Exit This Program...!!!");
printf("\n\n\t\t\tContinue For Press 1,Exit For Press 0 :->");
scanf("%ld",&ch1);
if(ch1==1)
{
clrscr();
goto IFELSE;
}
else
{
exit(0);
}
}
switch(ch6)
{
case 1:
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\tEnter Marks For Check Pass Or Fail:->");
scanf("%ld",&no1);
if(no1>=40)
{
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\t***********************************");
printf("\n\n\t\t\t\tThe Marks [%ld]:-> Pass ,Because Greater Then 40",no1);
printf("\n\n\t\t\t\t***********************************");
getch();
clrscr();
break;
}
else
{
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\t***********************************");
printf("\n\n\t\t\t\tThe Marks [%ld]:-> Fail ,Because Less Then 40",no1);
printf("\n\n\t\t\t\t***********************************");
getch();
clrscr();
break;
}
case 2:
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\tEnter Number For Check ODD Or EVEN:->");
scanf("%ld",&no1);
if(no1%2==0)
{
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\t***********************************");
printf("\n\n\t\t\t\tThe Number [%ld]:EVEN,Bcoze Modulize By 2",no1);
printf("\n\n\t\t\t\t***********************************");
getch();
clrscr();
break;
}
else
{
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\t***********************************");
printf("\n\n\t\t\t\tThe Number [%ld]:ODD,Bcoze Not Modulize By 2",no1);
printf("\n\n\t\t\t\t***********************************");
getch();
clrscr();
break;
}
case 3:
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\tEnter Year For Check Leap Year Or Not:->");
scanf("%ld",&no1);
if(no1%4==0)
{
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\t***********************************");
printf("\n\n\t\t\t\tThe Year [%ld]:Leap Year",no1);
printf("\n\n\t\t\t\t***********************************");
getch();
clrscr();
break;
}
else
{
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\t***********************************");
printf("\n\n\t\t\t\tThe Year [%ld]:Not Leap Year",no1);
printf("\n\n\t\t\t\t***********************************");
getch();
clrscr();
break;
}
case 4:
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\tEnter The First Number:->");
scanf("%ld",&no1);
printf("\n\n\t\t\t\tEnter The Second Number:->");
scanf("%ld",&no2);
if(no1>=no2)
{
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\t***********************************");
printf("\n\n\t\t\t\tThe Number [%ld] Is Maximum",no1);
printf("\n\n\t\t\t\t***********************************");
getch();
clrscr();
break;
}
else
{
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\t***********************************");
printf("\n\n\t\t\t\tThe Number [%ld] Is Maximum",no2);
printf("\n\n\t\t\t\t***********************************");
getch();
clrscr();
break;
}
case 5:
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\tEnter The First Number:->");
scanf("%ld",&no1);
printf("\n\n\t\t\t\tEnter The Second Number:->");
scanf("%ld",&no2);
if(no1<=no2)
{
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\t***********************************");
printf("\n\n\t\t\t\tThe Number [%ld] Is Minimum",no1);
printf("\n\n\t\t\t\t***********************************");
getch();
clrscr();
break;
}
else
{
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\t***********************************");
printf("\n\n\t\t\t\tThe Number [%ld] Is Minimum",no2);
printf("\n\n\t\t\t\t***********************************");
getch();
clrscr();
break;
}
case 6:
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\tEnter Any Number:->");
scanf("%ld",&no1);
if(no1>=50)
{
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\t***********************************");
printf("\n\n\t\t\t\tThe Number [%ld] Is Greater Then 50,VIVEK",no1);
printf("\n\n\t\t\t\t***********************************");
getch();
clrscr();
break;
}
else
{
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\t***********************************");
printf("\n\n\t\t\t\tThe Number [%ld] Is Less Then 50,CHAVDA",no2);
printf("\n\n\t\t\t\t***********************************");
getch();
clrscr();
break;
}
case 7:
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\tEnter Any Three Digit Number:->");
scanf("%ld",&no1);
if(no1>=999 || no1<=99)
{
printf("\n\n\t\t\t\tPlease Enter Only Three OR Two Digit Number...");
getch();
clrscr();
break;
}
else
{
a=no1/100;
b=no1%100;
c=b/10;
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\t***********************************");
printf("\n\n\t\t\t\tThe Number [%ld] Sum Of 1 and 2 Digit:->%ld",no1,a+c);
printf("\n\n\t\t\t\t***********************************");
getch();
clrscr();
break;
}
case 8:
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\tEnter Any Three Digit Number:->");
scanf("%ld",&no1);
if(no1>=999 || no1<=99)
{
printf("\n\n\t\t\t\tPlease Enter Only Three OR Two Digit Number...");
getch();
clrscr();
break;
}
else
{
a=no1/100;
b=no1%100;
c=b%10;
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\t***********************************");
printf("\n\n\t\t\t\tThe Number [%ld] Sum Of 1 and 3 Digit:->%ld",no1,a+c);
printf("\n\n\t\t\t\t***********************************");
getch();
clrscr();
break;
}
case 9:
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\tEnter Any Number:->");
scanf("%ld",&no1);
if(no1>=0 || no1==0)
{
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\t***********************************");
printf("\n\n\t\t\t\tThe Number [%ld] Is Positive.",no1);
printf("\n\n\t\t\t\t***********************************");
getch();
clrscr();
break;
}
else
{
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\t***********************************");
printf("\n\n\t\t\t\tThe Number [%ld] Is Negative.",(no1));
printf("\n\n\t\t\t\t***********************************");
getch();
clrscr();
break;
}
case 10:
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\tEnter Any Number:->");
scanf("%ld",&no1);
if(no1>=0 && no1<=9)
{
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\t***********************************");
printf("\n\n\t\t\t\tThe Number [%ld] Is Single Digit.",no1);
printf("\n\n\t\t\t\t***********************************");
getch();
clrscr();
break;
}
else
{
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\t***********************************");
printf("\n\n\t\t\t\tThe Number [%ld] Is Two Digit.",(no1));
printf("\n\n\t\t\t\t***********************************");
getch();
clrscr();
break;
}
}
}
while(ch6!=0);
ELSEIF:
clrscr();
do
{
printf("\n\n\t\t\t**************************");
printf("\n\n\t\t\t******** ELSE..IF ********");
printf("\n\n\t\t\t**************************");
printf("\n\n\n\n\n");
printf("\n\n\t\t1:Enter Three Subject Marks And Display Total,Per,Class.");
printf("\n\n\t\t2:Enter 1 To 7 Choice And Display Day Of Week.");
printf("\n\n\t\t3:Home Page");
printf("\n\n\t\t4:Main Menu Of IF Condition");
printf("\n\n\t\t5:Main Index");
printf("\n\n\t\t0:EXIT");
printf("\n\n\t\tSelect The Above Option:->");
scanf("%ld",&ch7);
if(ch7>=6)
{
printf("\n\n\n");
printf("\n\n\t\t\tPlease Select The Valid Option...!!!!");
getch();
clrscr();
goto ELSEIF;
}
if(ch7==3)
{
clrscr();
goto HOME;
}
if(ch7==4)
{
clrscr();
goto IF;
}
if(ch7==5)
{
clrscr();
goto FY;
}
if(ch7==0)
{
printf("\n\n\t\t\tAre You Want To Exit This Program...!!!");
printf("\n\n\t\t\tContinue For Press 1,Exit For Press 0 :->");
scanf("%ld",&ch1);
if(ch1==1)
{
clrscr();
goto ELSEIF;
}
else
{
exit(0);
}
}
switch(ch7)
{
case 1:
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\tEnter The First Subject Marks:->");
scanf("%ld",&a);
printf("\n\n\t\t\t\tEnter The Second Subject Marks:->");
scanf("%ld",&b);
printf("\n\n\t\t\t\tEnter The Third Subject Marks:->");
scanf("%ld",&c);
d=a+b+c;
e=d/3;
printf("\n\n\t\t\t\t===================================");
printf("\n\n\t\t\t\t***********************************");
printf("\n\n\t\t\t\tThe Total is[%ld]",d);
printf("\n\n\t\t\t\tThe Percentage[%ld]",e);
printf("\n\n\t\t\t\tThe Class is:->");
if(e>=70)
{
printf(" Distiction");
}
else if(e>=60)
{
printf("First");
}
else if(e>=50)
{
printf("Second");
}
else if(e>=40)
{
printf("Pass");
}
else
{
printf("Fail");
}
printf("\n\n\t\t\t\t***********************************");
getch();
clrscr();
break;
case 2:
printf("\n\n\t\t\t\tEnter Number Between 1 To 7:->");
scanf("%ld",&no1);
switch(no1)
{
case 1:
printf("\n\n\t\t\t\tMonday");
getch();
clrscr();
break;
case 2:
printf("\n\n\t\t\t\tTuesday");
getch();
clrscr();
break;
case 3:
printf("\n\n\t\t\t\tWednesday");
getch();
clrscr();
break;
case 4:
printf("\n\n\t\t\t\tThrusday");
getch();
clrscr();
break;
case 5:
printf("\n\n\t\t\t\tFriday");
getch();
clrscr();
break;
case 6:
printf("\n\n\t\t\t\tSaturday");
getch();
clrscr();
break;
case 7:
printf("\n\n\t\t\t\tSunday");
getch();
clrscr();
break;
default:
printf("\n\n\t\t\t\tInvalid Choice");
getch();
clrscr();
}
}
}
while(ch7!=0);
//============================LOOP Start=====================
LOOP:
clrscr();
printf("\n\n\t\t\t**************************");
printf("\n\n\t\t\t********** LOOP **********");
printf("\n\n\t\t\t**************************");
printf("\n\n\n\n\n");
printf("\n\n\t\t\t 1:FOR Loop Program");
printf("\n\n\t\t\t 2:While Loop Program");
printf("\n\n\t\t\t 3:DO...While Loop Program");
printf("\n\n\t\t\t 4:Home Page");
printf("\n\n\t\t\t 5:Main Index");
printf("\n\n\t\t\t 0:EXIT");
printf("\n\n\t\t\t Select The Above Option:->");
scanf("%ld",&ch8);
if(ch8>=6)
{
printf("\n\n\n");
printf("\n\n\t\t\tPlease Select The Valid Option...!!!!");
getch();
clrscr();
goto LOOP;
}
if(ch8==1)
{
goto FOR;
}
if(ch8==3)
{
goto DOWHILE;
}
if(ch8==2)
{
goto WHILE;
}
if(ch8==4)
{
clrscr();
goto HOME;
}
if(ch8==5)
{
clrscr();
goto FY;
}
if(ch8==0)
{
printf("\n\n\t\t\tAre You Want To Exit This Program...!!!");
printf("\n\n\t\t\tContinue For Press 1,Exit For Press 0 :->");
scanf("%ld",&ch1);
if(ch1==1)
{
clrscr();
goto LOOP;
}
else
{
exit(0);
}
}
//========================FOR Loop Starting=========================
FOR:
clrscr();
do
{
printf("\n\n\t\t\t**************************");
printf("\n\n\t\t\t******** FOR LOOP ********");
printf("\n\n\t\t\t**************************");
printf("\n\n\n\n\n");
printf("\n\n\t\t\t 1:Print The Ten Time Hello.");
printf("\n\n\t\t\t 2:Print The 1 To 10 Number.");
printf("\n\n\t\t\t 3:Print The 10 To 1 Number.");
printf("\n\n\t\t\t 4:print The 1 To 50 Even Number.");
printf("\n\n\t\t\t 5:Print The 1 To 50 Odd Number.");
printf("\n\n\t\t\t 6:Print The Sum Of 50 Number.");
printf("\n\n\t\t\t 7:Print The Sum Of N number.");
printf("\n\n\t\t\t 8:Print The Sum Of M To N number.");
printf("\n\n\t\t\t 9:Print The Squre Table Of Given Number.");
printf("\n\n\t\t\t 10:print The Qube Table Of Given Number.");
printf("\n\n\t\t\t 11:Print The Leap Year Of N Year.");
printf("\n\n\t\t\t 12:Home Page");
printf("\n\n\t\t\t 13:Main Menu Of Loop");
printf("\n\n\t\t\t 14:Main Index");
printf("\n\n\t\t\t 0:EXIT");
printf("\n\n\t\t\t Select The Above Program:->");
scanf("%ld",&ch9);
if(ch9>=15)
{
printf("\n\n\n");
printf("\n\n\t\t\tPlease Select The Valid Option...!!!!");
getch();
clrscr();
goto FOR;
}
if(ch9==12)
{
clrscr();
goto HOME;
}
if(ch9==13)
{
clrscr();
goto LOOP;
}
if(ch9==14)
{
clrscr();
goto FY;
}
if(ch9==0)
{
printf("\n\n\t\t\tAre You Want To Exit This Program...!!!");
printf("\n\n\t\t\tContinue For Press 1,Exit For Press 0 :->");
scanf("%ld",&ch1);
if(ch1==1)
{
clrscr();
goto FOR;
}
else
{
exit(0);
}
}
switch(ch9)
{
case 1:
for(i=1;i<=10;i++)
{
//textcolor(i+1);
printf("\n\n\t\t\t\tHELLO");
delay(500);
}
getch();
clrscr();
break;
case 2:
for(i=1;i<=10;i++)
{
//textcolor(i+1);
printf("\n\n\t\t\t\t[%ld]",i);
delay(500);
}
getch();
clrscr();
break;
case 3:
for(i=10;i>=1;i--)
{
//textcolor(i+1);
printf("\n\n\t\t\t\t[%ld]",i);
delay(500);
}
getch();
clrscr();
break;
case 4:
for(i=1;i<=50;i=i+2)
{
//textcolor(i+1);
printf("\n\n\t\t\t\t[%ld]",i);
delay(500);
}
getch();
clrscr();
break;
case 5:
for(i=2;i<=50;i=i+2)
{
//textcolor(i+1);
printf("\n\n\t\t\t\t[%ld]",i);
delay(500);
}
getch();
clrscr();
break;
case 6:
j=0;
for(i=1;i<=50;i++)
{
j=j+i;
}
printf("\n\n\t\t\t\t[%ld]",j);
getch();
clrscr();
break;
case 7:
j=0;
printf("\n\n\t\t\t\tEnter The Ending Number:->");
scanf("%ld",&no1);
for(i=1;i<=no1;i++)
{
j=j+i;
}
printf("\n\n\t\t\t\tThe Sum Of N Number [%ld]",j);
getch();
clrscr();
break;
case 8:
j=0;
printf("\n\n\t\t\t\tEnter Starting Number:->");
scanf("%ld",&no1);
printf("\n\n\t\t\t\tEnter Ending Number:->");
scanf("%ld",&no2);
for(i=no1;i<=no2;i++)
{
j=j+i;
}
//textcolor(3);
printf("\n\n\t\t\t\t[%ld]",j);
getch();
clrscr();
break;
case 9:
printf("\n\n\t\t\tEnter The Ending Number For Print Squre:->");
scanf("%ld",&no1);
for(i=1;i<=no1;i++)
{
j=i*i;
//textcolor(i);
printf("\n\n\t\t\t[%ld]=[%ld]",i,j);
delay(500);
}
getch();
clrscr();
break;
case 10:
printf("\n\n\t\t\tEnter The Ending Number For Print Squre:->");
scanf("%ld",&no1);
for(i=1;i<=no1;i++)
{
j=i*i*i;
//textcolor(i);
printf("\n\n\t\t\t[%ld]=[%ld]",i,j);
delay(500);
}
getch();
clrscr();
break;
case 11:
printf("\n\n\t\t\t\tEnter The Starting Year:->");
scanf("%ld",&no1);
printf("\n\n\t\t\t\tEnter The Ending Year:->");
scanf("%ld",&no2);
for(i=no1;i<=no2;i++)
{
if(i%4==0)
{
printf("\n\n\t\t\t\t[%ld]",i);
delay(500);
}
}
getch();
clrscr();
break;
default:
printf("\n\n\t\t\t\tPlease Enter Valid Choice..");
getch();
clrscr();
break;
}
}
while(ch9!=0);
//=======================FOR LOOP Complete================
//=======================WHILE LOOP Start=================
WHILE:
clrscr();
do
{
printf("\n\n\t\t\t**************************");
printf("\n\n\t\t\t******* WHILE LOOP *******");
printf("\n\n\t\t\t**************************");
printf("\n\n\n\n\n");
printf("\n\n\t\t\t 1:Print Ten Time HELLO");
printf("\n\n\t\t\t 2:Print The 1 To 10 Number");
printf("\n\n\t\t\t 3:Print The 10 To 1 Number.");
printf("\n\n\t\t\t 4:print The 1 To 50 Even Number.");
printf("\n\n\t\t\t 5:Print The 1 To 50 Odd Number.");
printf("\n\n\t\t\t 6:Print The Sum Of 50 Number.");
printf("\n\n\t\t\t 7:Print The Sum Of N number.");
printf("\n\n\t\t\t 8:Print The Sum Of M To N number.");
printf("\n\n\t\t\t 9:Print The Squre Table Of Given Number.");
printf("\n\n\t\t\t 10:print The Qube Table Of Given Number.");
printf("\n\n\t\t\t 11:Print The Leap Year Of N Year.");
printf("\n\n\t\t\t 12:Home Page");
printf("\n\n\t\t\t 13:Main Menu Of Loop");
printf("\n\n\t\t\t 14:Main Index");
printf("\n\n\t\t\t 0:EXIT");
printf("\n\n\t\t\t Select The Above Program:->");
scanf("%ld",&ch10);
if(ch10>=15)
{
printf("\n\n\n");
printf("\n\n\t\t\tPlease Select The Valid Option...!!!!");
getch();
clrscr();
goto WHILE;
}
if(ch10==12)
{
clrscr();
goto HOME;
}
if(ch10==13)
{
clrscr();
goto LOOP;
}
if(ch10==14)
{
clrscr();
goto FY;
}
if(ch10==0)
{
printf("\n\n\t\t\tAre You Want To Exit This Program...!!!");
printf("\n\n\t\t\tContinue For Press 1,Exit For Press 0 :->");
scanf("%ld",&ch1);
if(ch1==1)
{
clrscr();
goto WHILE;
}
else
{
exit(0);
}
}
switch(ch10)
{
case 1:
no1=1;
while(no1<=10)
{
// textcolor(5);
printf("\n\n\t\t\t\t[%ld] HELLO",no1);
no1=no1+1;
delay(700);
}
getch();
clrscr();
break;
case 2:
no1=1;
while(no1<=10)
{
//textcolor(2);
printf("\n\n\t\t\t\t[%ld]",no1);
no1=no1+1;
delay(700);
}
getch();
clrscr();
break;
case 3:
no1=10;
while(no1>=1)
{
//textcolor(3);
printf("\n\n\t\t\t\t[%ld]",no1);
no1=no1-1;
delay(700);
}
getch();
clrscr();
break;
case 4:
no1=2;
while(no1<=50)
{
//textcolor(6);
printf("\n\n\t\t\t\t[%ld]",no1);
no1=no1+2;
delay(500);
}
getch();
clrscr();
break;
case 5:
no1=1;
while(no1<=50)
{
//textcolor(7);
printf("\n\n\t\t\t\t[%ld]",no1);
no1=no1+2;
delay(400);
}
getch();
clrscr();
break;
case 6:
no1=1;
j=0;
while(no1<=50)
{
j=j+no1;
no1=no1+1;
}
printf("\n\n\t\t\t\tThe Sum Of 50 Number [%ld]",j);
getch();
clrscr();
break;
case 7:
no1=1;
j=0;
printf("\n\n\t\t\t\tEnter Last Number For Do The Sum:->");
scanf("%ld",&no2);
while(no1<=no2)
{
j=j+no1;
no1=no1+1;
}
//textcolor(8);
printf("\n\n\t\t\t\tThe Sum Of Given Number [%ld]",j);
getch();
clrscr();
break;
case 8:
j=0;
printf("\n\n\t\t\t\tEnter The Starting For Do The Sum:->");
scanf("%ld",&no1);
printf("\n\n\t\t\t\tEnter Ending Number For Do The Sum:->");
scanf("%ld",&no2);
while(no1<=no2)
{
j=j+no1;
no1=no1+1;
}
// textcolor(9);
printf("\n\n\t\t\t\tThe Sum Of Given Number [%ld]",j);
getch();
clrscr();
break;
case 9:
no1=1;
j=0;
printf("\n\n\t\t\t\tEnter Last Number For Print Squre:->");
scanf("%ld",&no2);
while(no1<=no2)
{
j=no1*no1;
no1=no1+1;
printf("\n\n\t\t\t\t[%ld] [%ld]",no1-1,j);
delay(700);
}
getch();
clrscr();
break;
case 10:
no1=1;
j=0;
printf("\n\n\t\t\t\tEnter Last Number For Print Qube:->");
scanf("%ld",&no2);
while(no1<=no2)
{
j=no1*no1*no1;
no1=no1+1;
printf("\n\n\t\t\t\t[%ld] [%ld]",no1-1,j);
delay(700);
}
getch();
clrscr();
break;
case 11:
printf("\n\n\t\t\t\tEnter The Starting Year:->");
scanf("%ld",&no1);
printf("\n\n\t\t\t\tEnter The Ending Year:->");
scanf("%ld",&no2);
while(no1<=no2)
{
if(no1%4==0)
{
printf("\n\n\t\t\t\t[%ld]",no1);
delay(600);
getch();
clrscr();
break;
}
no1=no1+1;
}
getch();
clrscr();
break;
}
}
while(ch10!=0);
//==========================WHILE LOOP Complete====================
//==========================DO WHILE LOOP Start====================
DOWHILE:
clrscr();
do
{
printf("\n\n\t\t\t**************************");
printf("\n\n\t\t\t******* DO...WHILE *******");
printf("\n\n\t\t\t**************************");
printf("\n\n\n\n\n");
printf("\n\n\t\t\t 1:Print Ten Time HELLO");
printf("\n\n\t\t\t 2:Print The 1 To 10 Number");
printf("\n\n\t\t\t 3:Print The 10 To 1 Number.");
printf("\n\n\t\t\t 4:print The 1 To 50 Even Number.");
printf("\n\n\t\t\t 5:Print The 1 To 50 Odd Number.");
printf("\n\n\t\t\t 6:Print The Sum Of 50 Number.");
printf("\n\n\t\t\t 7:Print The Sum Of N number.");
printf("\n\n\t\t\t 8:Print The Sum Of M To N number.");
printf("\n\n\t\t\t 9:Print The Squre Table Of Given Number.");
printf("\n\n\t\t\t 10:print The Qube Table Of Given Number.");
printf("\n\n\t\t\t 11:Print The Leap Year Of N Year.");
printf("\n\n\t\t\t 12:Home Page");
printf("\n\n\t\t\t 13:Main Menu Of Loop");
printf("\n\n\t\t\t 14:Main Index");
printf("\n\n\t\t\t 0:EXIT");
printf("\n\n\t\t\t Select The Above Program:->");
scanf("%ld",&ch11);
if(ch11>=15)
{
printf("\n\n\n");
printf("\n\n\t\t\tPlease Select The Valid Option...!!!!");
getch();
clrscr();
goto DOWHILE;
}
if(ch11==12)
{
clrscr();
goto HOME;
}
if(ch11==13)
{
clrscr();
goto LOOP;
}
if(ch11==14)
{
clrscr();
goto FY;
}
if(ch11==0)
{
printf("\n\n\t\t\tAre You Want To Exit This Program...!!!");
printf("\n\n\t\t\tContinue For Press 1,Exit For Press 0 :->");
scanf("%ld",&ch1);
if(ch1==1)
{
clrscr();
goto DOWHILE;
}
else
{
exit(0);
}
}
switch(ch11)
{
case 0:
exit(0);
case 1:
no1=1;
do
{
printf("\n\n\t\t\t\t[%ld] HELLO",no1);
delay(600);
no1=no1+1;
}
while(no1<=10);
getch();
clrscr();
break;
case 2:
no1=1;
do
{
printf("\n\n\t\t\t\t[%ld]",no1);
delay(600);
no1=no1+1;
}
while(no1<=10);
getch();
clrscr();
break;
case 3:
no1=10;
do
{
printf("\n\n\t\t\t\t[%ld]",no1);
delay(600);
no1=no1-1;
}
while(no1>=1);
getch();
clrscr();
break;
case 4:
no1=2;
do
{
printf("\n\n\t\t\t\t[%ld]",no1);
delay(600);
no1=no1+2;
}
while(no1<=50);
getch();
clrscr();
break;
case 5:
no1=1;
do
{
printf("\n\n\t\t\t\t[%ld]",no1);
delay(600);
no1=no1+2;
}
while(no1<=50);
getch();
clrscr();
break;
case 6:
no1=1;
j=0;
do
{
j=j+no1;
no1=no1+1;
}
while(no1<=50);
printf("\n\n\t\t\t\t[%ld]",j);
getch();
clrscr();
break;
case 7:
no1=1;
j=0;
printf("\n\n\t\t\t\tEnter The Ending Number For Print Sum:->");
scanf("%ld",&no2);
do
{
j=j+no1;
no1=no1+1;
}
while(no1<=no2);
printf("\n\n\t\t\t\t[%ld]",j);
getch();
clrscr();
break;
case 8:
j=0;
printf("\n\n\t\t\t\tEnter The Starting Number For Print Sum:->");
scanf("%ld",&no1);
printf("\n\n\t\t\t\tEnter The Ending Number For Print Sum:->");
scanf("%ld",&no2);
do
{
j=j+no1;
no1=no1+1;
}
while(no1<=no2);
printf("\n\n\t\t\t\t[%ld]",j);
getch();
clrscr();
break;
case 9:
no1=1;
j=0;
printf("\n\n\t\t\t\tEnter The Ending Number For Print Squre:->");
scanf("%ld",&no2);
do
{
printf("\n\n\t\t\t\t[%ld] [%ld]",no1-1,j);
delay(500);
j=no1*no1;
no1=no1+1;
}
while(no1<=no2+1);
getch();
clrscr();
break;
case 10:
no1=1;
j=0;
printf("\n\n\t\t\t\tEnter The Ending Number For Print Qube:->");
scanf("%ld",&no2);
do
{
printf("\n\n\t\t\t\t[%ld] [%ld]",no1-1,j);
delay(500);
j=no1*no1*no1;
no1=no1+1;
}
while(no1<=no2+1);
getch();
clrscr();
break;
case 11:
j=0;
printf("\n\n\t\t\t\tEnter The Starting Year:->");
scanf("%ld",&no1);
printf("\n\n\t\t\t\tEnter The Ending Year:->");
scanf("%ld",&no2);
do
{
if(no1%4==0)
{
printf("\n\n\t\t\t\t[%ld]",no1);
delay(500);
}
no1=no1+1;
}
while(no1<=no2);
getch();
clrscr();
break;
default:
printf("\n\n\t\t\t\tPlease Enter The Valid Choice...");
getch();
clrscr();
break;
}
}
while(ch11!=0);
//====================DO WHILE LOOP Complete=================
//====================ARRAY Starting=========================
ARRAY:
clrscr();
printf("\n\n\t\t\t**************************");
printf("\n\n\t\t\t********** ARRAY *********");
printf("\n\n\t\t\t**************************");
printf("\n\n\n\n\n");
printf("\n\n\t\t\t 1:->One Dimension Array");
printf("\n\n\t\t\t 2:->Two Dimension Array");
printf("\n\n\t\t\t 3:->Multi Dimension Array");
printf("\n\n\t\t\t 4:->Home Page");
printf("\n\n\t\t\t 5:->Sub Index");
printf("\n\n\t\t\t 6:->Main Index");
printf("\n\n\t\t\t 0:->EXIT");
printf("\n\n\t\t\t Select The Above Option:->");
scanf("%ld",&ch12);
if(ch12>=7)
{
printf("\n\n\n");
printf("\n\n\t\t\tPlease Select The Valid Option...!!!!");
getch();
clrscr();
goto ARRAY;
}
if(ch12==2)
{
goto TWOD;
}
if(ch12==3)
{
goto MULTID;
}
if(ch12==1)
{
goto ONED;
}
if(ch12==4)
{
clrscr();
goto HOME;
}
if(ch12==5)
{
clrscr();
goto NUMERIC;
}
if(ch12==6)
{
clrscr();
goto FY;
}
if(ch12==0)
{
printf("\n\n\t\t\tAre You Want To Exit This Program...!!!");
printf("\n\n\t\t\tContinue For Press 1,Exit For Press 0 :->");
scanf("%ld",&ch1);
if(ch1==1)
{
clrscr();
goto ARRAY;
}
else
{
exit(0);
}
}
//=====================ONE Dimension Start================
ONED:
clrscr();
printf("\n\n\t\t\t***************************");
printf("\n\n\t\t\t*** One Dimension Array ***");
printf("\n\n\t\t\t***************************");
printf("\n\n\n\n\n");
printf("\n\n\t\t\t 1:->Simple Program");
printf("\n\n\t\t\t 2:->Sorting Program");
printf("\n\n\t\t\t 3:->Searching Program");
printf("\n\n\t\t\t 4:->Home Page");
printf("\n\n\t\t\t 5:->Main Menu Of Array");
printf("\n\n\t\t\t 6:->Sub Index");
printf("\n\n\t\t\t 7:->Main Index");
printf("\n\n\t\t\t 0:->EXIT");
printf("\n\n\t\t\t Select The Above Option:->");
scanf("%ld",&ch13);
if(ch13>=8)
{
printf("\n\n\n");
printf("\n\n\t\t\tPlease Select The Valid Option...!!!!");
getch();
clrscr();
goto ONED;
}
if(ch13==3)
{
goto SEARCHING;
}
if(ch13==1)
{
goto SIMPLEONED;
}
if(ch13==2)
{
goto SORTING;
}
if(ch13==4)
{
clrscr();
goto HOME;
}
if(ch13==5)
{
clrscr();
goto ARRAY;
}
if(ch13==6)
{
clrscr();
goto NUMERIC;
}
if(ch13==7)
{
clrscr();
goto FY;
}
if(ch13==0)
{
printf("\n\n\t\t\tAre You Want To Exit This Program...!!!");
printf("\n\n\t\t\tContinue For Press 1,Exit For Press 0 :->");
scanf("%ld",&ch1);
if(ch1==1)
{
clrscr();
goto ONED;
}
else
{
exit(0);
}
}
SIMPLEONED:
clrscr();
do
{
printf("\n\n\t\t\t**************************");
printf("\n\n\t\t\t** One D Simple Program **");
printf("\n\n\t\t\t**************************");
printf("\n\n\n\n\n");
printf("\n\n\t\t\t 1:Enter Any Ten Number And Display It.");
printf("\n\n\t\t\t 2:Enter Any Ten Number And Display Reverse.");
printf("\n\n\t\t\t 3:Enter Any Ten Number And Display It Addition.");
printf("\n\n\t\t\t 4:Enter Any Ten Number And Display It Average.");
printf("\n\n\t\t\t 5:Enter Any Ten Number And Display Maximum No.");
printf("\n\n\t\t\t 6:Enter Any Ten Number And Display Minimum No.");
printf("\n\n\t\t\t 7:Home Page");
printf("\n\n\t\t\t 8:Main Menu Of Array.");
printf("\n\n\t\t\t 9:Main Menu Of One Dimension Array.");
printf("\n\n\t\t\t 10:Main Index.");
printf("\n\n\t\t\t 11:Sub Index.");
printf("\n\n\t\t\t 0:EXIT.");
printf("\n\n\t\t\t Select The Above Option:->");
scanf("%ld",&ch14);
if(ch14>=12)
{
printf("\n\n\n");
printf("\n\n\t\t\tPlease Select The Valid Option...!!!!");
getch();
clrscr();
goto SIMPLEONED;
}
if(ch14==7)
{
clrscr();
goto HOME;
}
if(ch14==8)
{
clrscr();
goto ARRAY;
}
if(ch14==9)
{
clrscr();
goto ONED;
}
if(ch14==10)
{
clrscr();
goto FY;
}
if(ch14==11)
{
clrscr();
goto NUMERIC;
}
if(ch14==0)
{
printf("\n\n\t\t\tAre You Want To Exit This Program...!!!");
printf("\n\n\t\t\tContinue For Press 1,Exit For Press 0 :->");
scanf("%ld",&ch1);
if(ch1==1)
{
clrscr();
goto SIMPLEONED;
}
else
{
exit(0);
}
}
switch(ch14)
{
case 1:
for(i=1;i<=10;i++)
{
printf("\n\n\t\t\tEnter The [%ld] Number:->",i);
scanf("%ld",&list[i]);
}
clrscr();
for(i=1;i<=10;i++)
{
printf("\n\n\t\t\tThe [%ld] Number Is = [%ld]",i,list[i]);
delay(600);
}
getch();
clrscr();
break;
case 2:
for(i=1;i<=10;i++)
{
printf("\n\n\t\t\tEnter The [%ld] Number:->",i);
scanf("%ld",&list[i]);
}
clrscr();
for(i=10;i>=1;i--)
{
printf("\n\n\t\t\tThe [%ld] Number Is = [%ld]",i,list[i]);
delay(600);
}
getch();
clrscr();
break;
case 3:
for(i=1;i<=10;i++)
{
printf("\n\n\t\t\tEnter The [%ld] Number:->",i);
scanf("%ld",&list[i]);
}
clrscr();
for(i=1;i<=10;i++)
{
tot=tot+list[i];
printf("\n\n\t\t\tThe [%ld] Number Is = [%ld]",i,list[i]);
delay(600);
}
printf("\n\n\t\t\tThe Total [%ld]",tot);
getch();
clrscr();
break;
case 4:
for(i=1;i<=10;i++)
{
printf("\n\n\t\t\tEnter The [%ld] Number:->",i);
scanf("%ld",&list[i]);
}
clrscr();
for(i=1;i<=10;i++)
{
tot=tot+list[i];
printf("\n\n\t\t\tThe [%ld] Number Is = [%ld]",i,list[i]);
delay(600);
}
printf("\n\n\t\t\tThe Total [%ld]",tot);
printf("\n\n\t\t\tThe Average [%ld]",tot/10);
getch();
clrscr();
break;
case 5:
printf("\n\n\t\t\tEnter How Many Element:->");
scanf("%ld",&n);
for(i=1;i<=n;i++)
{
printf("\n\n\t\t\tEnter The [%ld] Number:->",i);
scanf("%ld",&list[i]);
}
for(i=1;i<=n;i++)
{
if(tot<=list[i])
{
tot=list[i];
}
}
clrscr();
printf("\n\n\t\t\tThe Maximum Number [%ld]",tot);
getch();
clrscr();
break;
case 6:
printf("\n\n\t\t\tEnter How Many Element:->");
scanf("%ld",&n);
for(i=1;i<=n;i++)
{
printf("\n\n\t\t\tEnter The [%ld] Number:->",i);
scanf("%ld",&list[i]);
}
ds=list[0];
for(i=1;i<=n;i++)
{
if(ds>=list[i])
{
ds=list[i];
}
}
clrscr();
printf("\n\n\t\t\tThe Minimum Number [%ld]",ds);
getch();
clrscr();
break;
}
}
while(ch14!=0);
SORTING:
clrscr();
printf("\n\n\t\t\t***************************");
printf("\n\n\t\t\t***** Sorting Program *****");
printf("\n\n\t\t\t***************************");
printf("\n\n\n\n\n");
printf("\n\n\t\t\t 1:Bubble Sort.");
printf("\n\n\t\t\t 2:Selection Sort.");
printf("\n\n\t\t\t 3:Insertion Sort.");
printf("\n\n\t\t\t 4:Shell Sort.");
printf("\n\n\t\t\t 5:Home Page");
printf("\n\n\t\t\t 6:Main Menu Of One Dimension Array.");
printf("\n\n\t\t\t 7:Main Index.");
printf("\n\n\t\t\t 8:Sub Index.");
printf("\n\n\t\t\t 0:EXIT.");
printf("\n\n\t\t\t Select The Above Option:->");
scanf("%ld",&ch1);
if(ch1>=9)
{
printf("\n\n\n");
printf("\n\n\t\t\tPlease Select The Valid Option...!!!!");
getch();
clrscr();
goto SORTING;
}
if(ch1==3)
{
goto INSERTION;
}
if(ch1==4)
{
goto SHELL;
}
if(ch1==2)
{
goto SELECTION;
}
if(ch1==1)
{
goto BUBBLE;
}
if(ch1==5)
{
clrscr();
goto HOME;
}
if(ch1==6)
{
clrscr();
goto ONED;
}
if(ch1==7)
{
clrscr();
goto FY;
}
if(ch1==8)
{
clrscr();
goto NUMERIC;
}
if(ch1==0)
{
printf("\n\n\t\t\tAre You Want To Exit This Program...!!!");
printf("\n\n\t\t\tContinue For Press 1,Exit For Press 0 :->");
scanf("%ld",&ch1);
if(ch1==1)
{
clrscr();
goto SORTING;
}
else
{
exit(0);
}
}
BUBBLE:
clrscr();
do
{
printf("\n\n\t\t\t***************************");
printf("\n\n\t\t\t******* BUBBLE SORT *******");
printf("\n\n\t\t\t***************************");
printf("\n\n\n\n\n");
printf("\n\n\t\t\t 1:Ascending Program.");
printf("\n\n\t\t\t 2:Decending Program.");
printf("\n\n\t\t\t 3:Main Menu Of Sorting.");
printf("\n\n\t\t\t 0:EXIT");
printf("\n\n\t\t\t Select The Above Option:->");
scanf("%ld",&ch2);
if(ch2>=4)
{
printf("\n\n\n");
printf("\n\n\t\t\tPlease Select The Valid Option...!!!!");
getch();
clrscr();
goto BUBBLE;
}
if(ch2==3)
{
clrscr();
goto SORTING;
}
if(ch2==0)
{
printf("\n\n\t\t\tAre You Want To Exit This Program...!!!");
printf("\n\n\t\t\tContinue For Press 1,Exit For Press 0 :->");
scanf("%ld",&ch1);
if(ch1==1)
{
clrscr();
goto BUBBLE;
}
else
{
exit(0);
}
}
switch(ch2)
{
case 1:
for(i=1;i<=5;i++)
{
printf("\n\n\t\t\tEnter The [%ld] Number:->",i);
scanf("%ld",&list[i]);
}
for(i=1;i<=5;i++)
{
for(j=1;j<=5-1;j++)
{
if(list[j]>=list[j+1])
{
k=list[j+1];
list[j+1]=list[j];
list[j]=k;
}
}
}
printf("\n\n\t\t\tAscending Order");
for(i=1;i<=5;i++)
{
printf("\n\n\t\t\t[%ld]",list[i]);
delay(600);
}
getch();
clrscr();
break;
case 2:
for(i=1;i<=5;i++)
{
printf("\n\n\t\t\tEnter The [%ld] Number:->",i);
scanf("%ld",&list[i]);
}
for(i=1;i<=5;i++)
{
for(j=1;j<=5-1;j++)
{
if(list[j]<=list[j+1])
{
k=list[j+1];
list[j+1]=list[j];
list[j]=k;
}
}
}
printf("\n\n\t\t\tDecending Order");
for(i=1;i<=5;i++)
{
printf("\n\n\t\t\t[%ld]",list[i]);
delay(600);
}
getch();
clrscr();
break;
}
}
while(ch2!=0);
SELECTION:
clrscr();
do
{
printf("\n\n\t\t\t**************************");
printf("\n\n\t\t\t***** SELECTION SORT *****");
printf("\n\n\t\t\t**************************");
printf("\n\n\n\n\n");
printf("\n\n\t\t\t 1:Ascending Program.");
printf("\n\n\t\t\t 2:Decending Program.");
printf("\n\n\t\t\t 3:Main Menu Of Sorting.");
printf("\n\n\t\t\t 0:EXIT");
printf("\n\n\t\t\t Select The Above Option:->");
scanf("%ld",&ch3);
if(ch3>=4)
{
printf("\n\n\n");
printf("\n\n\t\t\tPlease Select The Valid Option...!!!!");
getch();
clrscr();
goto SELECTION;
}
if(ch3==3)
{
clrscr();
goto SORTING;
}
if(ch3==0)
{
printf("\n\n\t\t\tAre You Want To Exit This Program...!!!");
printf("\n\n\t\t\tContinue For Press 1,Exit For Press 0 :->");
scanf("%ld",&ch1);
if(ch1==1)
{
clrscr();
goto SELECTION;
}
else
{
exit(0);
}
}
switch(ch3)
{
case 1:
for(i=1;i<=5;i++)
{
printf("\n\n\t\t\tEnter The [%ld] Number:->",i);
scanf("%ld",&list[i]);
}
for(i=1;i<=5;i++)
{
for(j=i+1;j<=5;j++)
{
if(list[i]>=list[j])
{
k=list[i];
list[i]=list[j];
list[j]=k;
}
}
}
printf("\n\n\t\t\tAscending Order");
for(i=1;i<=5;i++)
{
printf("\n\n\t\t\t[%ld]",list[i]);
delay(600);
}
getch();
clrscr();
break;
case 2:
for(i=1;i<=5;i++)
{
printf("\n\n\t\t\tEnter The [%ld] Number:->",i);
scanf("%ld",&list[i]);
}
for(i=1;i<=5;i++)
{
for(j=i+1;j<=5;j++)
{
if(list[i]<=list[j])
{
k=list[i];
list[i]=list[j];
list[j]=k;
}
}
}
printf("\n\n\t\t\tDecending Order");
for(i=1;i<=5;i++)
{
printf("\n\n\t\t\t[%ld]",list[i]);
delay(600);
}
getch();
clrscr();
break;
}
}
while(ch3!=0);
INSERTION:
clrscr();
do
{
printf("\n\n\t\t\t**************************");
printf("\n\n\t\t\t***** INSERTION SORT *****");
printf("\n\n\t\t\t**************************");
printf("\n\n\n\n\n");
printf("\n\n\t\t\t 1:Ascending Program.");
printf("\n\n\t\t\t 2:Main Menu Of Sorting.");
printf("\n\n\t\t\t 0:EXIT");
printf("\n\n\t\t\t Select The Above Option:->");
scanf("%ld",&ch2);
if(ch2>=4)
{
printf("\n\n\n");
printf("\n\n\t\t\tPlease Select The Valid Option...!!!!");
getch();
clrscr();
goto INSERTION;
}
if(ch2==2)
{
clrscr();
goto SORTING;
}
if(ch2==0)
{
printf("\n\n\t\t\tAre You Want To Exit This Program...!!!");
printf("\n\n\t\t\tContinue For Press 1,Exit For Press 0 :->");
scanf("%ld",&ch1);
if(ch1==1)
{
clrscr();
goto INSERTION;
}
else
{
exit(0);
}
}
switch(ch2)
{
case 1:
printf("\n\n\t\t\tEnter Any Five Number:");
for(i=0;i<=4;i++)
{
printf("\n\n\t\t\tEnter The [%ld] Value:->",i+1);
scanf("%ld",&list[i]);
k=list[i];
pointer=i-1;
while(k<list[pointer])
{
list[pointer+1]=list[pointer];
list[pointer]=k;
pointer=pointer-1;
}
printf("\n\n\t\t\tAscending Order");
for(j=0;j<=i;j++)
{
printf("\n\n\t\t\t[%ld]",list[j]);
}
}
getch();
clrscr();
break;
}
}
while(ch2!=0);
SHELL:
clrscr();
do
{
printf("\n\n\t\t\t**************************");
printf("\n\n\t\t\t******* SHELL SORT *******");
printf("\n\n\t\t\t**************************");
printf("\n\n\n\n\n");
printf("\n\n\t\t\t 1:Ascending Program.");
printf("\n\n\t\t\t 2:Main Menu Of Sorting.");
printf("\n\n\t\t\t 0:EXIT");
printf("\n\n\t\t\t Select The Above Option:->");
scanf("%ld",&ch2);
if(ch2>=3)
{
printf("\n\n\n");
printf("\n\n\t\t\tPlease Select The Valid Option...!!!!");
getch();
clrscr();
goto SHELL;
}
if(ch2==2)
{
clrscr();
goto SORTING;
}
if(ch2==0)
{
printf("\n\n\t\t\tAre You Want To Exit This Program...!!!");
printf("\n\n\t\t\tContinue For Press 1,Exit For Press 0 :->");
scanf("%ld",&ch1);
if(ch1==1)
{
clrscr();
goto SHELL;
}
else
{
exit(0);
}
}
switch(ch2)
{
case 1:
printf("\n\n\t\t\tEnter How Many Element:->");
scanf("%ld",&size);
for(i=0;i<=size;i++)
{
printf("\n\n\t\t\tEnter [%ld] Number:->",i);
scanf("%ld",&list[i]);
}
dist=size/2;
while(dist)
{
do
{
swap=0;
for(i=0;i<=(size-dist);i++)
{
if(list[i]>list[i+dist])
{
temp=list[i];
list[i]=list[i+dist];
list[i+dist]=temp;
swap=1;
}
}
}
while(swap);
dist=dist/2;
}
printf("\n\n\t\t\tAscending Order");
for(i=0;i<=size;i++)
{
printf("\n\n\t\t\t[%ld]",list[i]);
delay(700);
}
getch();
clrscr();
break;
case 2:
printf("\n\n\t\t\tEnter How Many Element:->");
scanf("%ld",&size);
for(i=0;i<=size;i++)
{
printf("\n\n\t\t\tEnter [%ld] Number:->",i);
scanf("%ld",&list[i]);
}
dist=size/2;
while(dist)
{
do
{
swap=0;
for(i=0;i<=(size-dist);i++)
{
if(list[i]<list[i+dist])
{
temp=list[i];
list[i]=list[i+dist];
list[i+dist]=temp;
swap=1;
}
}
}
while(swap);
dist=dist/2;
}
printf("\n\n\t\t\tDecending Order");
for(i=0;i<=size;i++)
{
printf("\n\n\t\t\t[%ld]",list[i]);
delay(700);
}
getch();
clrscr();
break;
}
}
while(ch2!=0);
//=============================SORTING Complete====================
//=============================SEARCHING Start=====================
SEARCHING:
clrscr();
do
{
printf("\n\n\t\t\t*****************************");
printf("\n\n\t\t\t***** SEARCHING PROGRAM *****");
printf("\n\n\t\t\t*****************************");
printf("\n\n\n\n\n");
printf("\n\n\t\t\t 1:Linear Or Sequential Searching Program");
printf("\n\n\t\t\t 2:Binary Searching Program");
printf("\n\n\t\t\t 3:Home Page");
printf("\n\n\t\t\t 4:Main Menu Of One Dimension Array.");
printf("\n\n\t\t\t 5:Main Index.");
printf("\n\n\t\t\t 6:Sub Index.");
printf("\n\n\t\t\t 0:EXIT.");
printf("\n\n\t\t\t Select The Above Option:->");
scanf("%ld",&ch1);
if(ch1>=7)
{
printf("\n\n\n");
printf("\n\n\t\t\tPlease Select The Valid Option...!!!!");
getch();
clrscr();
goto SEARCHING;
}
if(ch1==3)
{
clrscr();
goto HOME;
}
if(ch1==4)
{
clrscr();
goto ONED;
}
if(ch1==5)
{
clrscr();
goto FY;
}
if(ch1==6)
{
clrscr();
goto NUMERIC;
}
if(ch1==0)
{
printf("\n\n\t\t\tAre You Want To Exit This Program...!!!");
printf("\n\n\t\t\tContinue For Press 1,Exit For Press 0 :->");
scanf("%ld",&ch1);
if(ch1==1)
{
clrscr();
goto SEARCHING;
}
else
{
exit(0);
}
}
switch(ch1)
{
case 1:
printf("\n\n\t\t\tEnter How Many Element:->");
scanf("%ld",&n);
for(i=1;i<=n;i++)
{
printf("\n\n\t\t\tEnter The [%ld] Element",i);
scanf("%ld",&list[i]);
}
clrscr();
printf("\n\n\t\t\tEnter Element For Search:->");
scanf("%ld",&a);
for(i=1;i<=n;i++)
{
if(list[i]==a)
{
tot=1;
}
printf("\n\n\t\t\tThe [%ld] Element is :-> [%ld]",i,list[i]);
}
if(tot==1)
{
printf("\n\n\t\t\tThe Element [%ld] Is Found",a);
}
else
{
printf("\n\n\t\t\tThe Element [%ld] Is Not Found",a);
}
getch();
clrscr();
break;
case 2:
printf("\n\n\t\t\tEnter The How Many Element:->");
scanf("%ld",&n);
for(i=1;i<=n;i++)
{
printf("\n\n\t\t\tEnter The [%ld] Element:->",i);
scanf("%ld",&list[i]);
}
for(i=1;i<=n;i++)
{
for(j=i+1;j<=n;j++)
{
if(list[i]>=list[j])
{
temp=list[i];
list[i]=list[j];
list[j]=temp;
}
}
}
printf("Enter the element for search:");
scanf("%ld",&element);
low=0;
high=n-1;
flag=1;
while(low<=high)
{
mid=(low+high)/2;
if(element<list[mid])
high=mid-1;
else if(element>list[mid])
low=mid+1;
else if(list[mid]==element)
{
printf("\n\n\t\t\tElement [%ld] Found",element);
flag=0;
break;
}
}
if(flag)
printf("\n\n\t\t\tElement [%ld] Not Found",element);
getch();
clrscr();
break;
}
}
while(ch1!=0);
//=========================ONE D Array Complete=====================
//=========================TWO D Array Start========================
TWOD:
clrscr();
printf("\n\n\t\t\t*******************************");
printf("\n\n\t\t\t***** TWO Dimension ARRAY *****");
printf("\n\n\t\t\t*******************************");
printf("\n\n\n\n\n");
printf("\n\n\t\t\t 1:->2X2 Matrix");
printf("\n\n\t\t\t 2:->3X3 Matrix");
printf("\n\n\t\t\t 3:->Home Page");
printf("\n\n\t\t\t 4:->Main Menu Of Array");
printf("\n\n\t\t\t 5:->Main Index");
printf("\n\n\t\t\t 6:->Sub Index");
printf("\n\n\t\t\t 0:->Exit");
printf("\n\n\t\t\t Select The Above Option:->");
scanf("%ld",&ch1);
if(ch1>=7)
{
printf("\n\n\n");
printf("\n\n\t\t\tPlease Select The Valid Option...!!!!");
getch();
clrscr();
goto TWOD;
}
if(ch1==3)
{
clrscr();
goto HOME;
}
if(ch1==2)
{
goto THREETHREE;
}
if(ch1==4)
{
clrscr();
goto ARRAY;
}
if(ch1==5)
{
clrscr();
goto FY;
}
if(ch1==6)
{
clrscr();
goto NUMERIC;
}
if(ch1==0)
{
printf("\n\n\t\t\tAre You Want To Exit This Program...!!!");
printf("\n\n\t\t\tContinue For Press 1,Exit For Press 0 :->");
scanf("%ld",&ch1);
if(ch1==1)
{
clrscr();
goto TWOD;
}
else
{
exit(0);
}
}
if(ch1==1)
{
goto TWOTWO;
}
TWOTWO:
clrscr();
do
{
printf("\n\n\t\t\t*******************************");
printf("\n\n\t\t\t**** TWO DIMENSION PROGRAM ****");
printf("\n\n\t\t\t*******************************");
printf("\n\n\n\n\n");
printf("\n\n\t\t\t 1:Enter Any 2X2 Matrix And Display It");
printf("\n\n\t\t\t 2:Enter Any 2X2 Matrix And Display It Transpose");
printf("\n\n\t\t\t 3:Enter Any Two 2X2 Matrix And Display It");
printf("\n\n\t\t\t 4:Enter Any Two 2X2 Matrix And Display Addition");
printf("\n\n\t\t\t 5:Enter Any Two 2X2 Matrix And Display Substraction");
printf("\n\n\t\t\t 6:Enter Any Two 2X2 Matrix And Display Multiplication");
printf("\n\n\t\t\t 7:Main Menu Of Two Dimension Array");
printf("\n\n\t\t\t 8:Main Menu Of Array");
printf("\n\n\t\t\t 9:Home Page");
printf("\n\n\t\t\t 0:EXIT");
printf("\n\n\t\t\t Select The Above Option:->");
scanf("%ld",&ch1);
if(ch1>=10)
{
printf("\n\n\n");
printf("\n\n\t\t\tPlease Select The Valid Option...!!!!");
getch();
clrscr();
goto TWOTWO;
}
if(ch1==7)
{
clrscr();
goto TWOD;
}
if(ch1==8)
{
clrscr();
goto ARRAY;
}
if(ch1==9)
{
clrscr();
goto HOME;
}
if(ch1==0)
{
printf("\n\n\t\t\tAre You Want To Exit This Program...!!!");
printf("\n\n\t\t\tContinue For Press 1,Exit For Press 0 :->");
scanf("%ld",&ch1);
if(ch1==1)
{
clrscr();
goto TWOTWO;
}
else
{
exit(0);
}
}
switch(ch1)
{
case 1:
printf("\n\n\t\t\tEnter Any 2X2 Matrix:\n");
for(i=0;i<=1;i++)
{
for(j=0;j<=1;j++)
{
printf("\n\n\t\t\tEnter [%ld] [%ld] Value:->",i,j);
scanf("%ld",&m1[i][j]);
}
}
printf("\n\n\n**********************");
printf("\n\nThe 2X2 Matrix:\n");
printf("\n\n");
for(i=0;i<=1;i++)
{
for(j=0;j<=1;j++)
{
printf("%ld",m1[i][j]);
}
printf("\n");
}
printf("\n**********************");
getch();
clrscr();
break;
case 2:
printf("\n\n\t\t\tEnter Any 2X2 Matrix Fo Transpose:\n");
for(i=0;i<=1;i++)
{
for(j=0;j<=1;j++)
{
printf("\n\n\t\t\tEnter [%ld] [%ld] Value:->",i,j);
scanf("%ld",&m1[i][j]);
}
}
printf("\n\n\n**********************");
printf("\n\nThe 2X2 Transpose Matrix:\n");
printf("\n\n");
for(i=0;i<=1;i++)
{
for(j=0;j<=1;j++)
{
printf("%ld",m1[j][i]);
}
printf("\n");
}
printf("\n**********************");
getch();
clrscr();
break;
case 3:
printf("\n\n\t\t\tEnter Any First 2X2 Matrix:\n");
for(i=0;i<=1;i++)
{
for(j=0;j<=1;j++)
{
printf("\n\n\t\t\tEnter [%ld] [%ld] Value:->",i,j);
scanf("%ld",&m1[i][j]);
}
}
printf("\n\n\t\t\tEnter Any Second 2X2 Matrix:\n");
for(i=0;i<=1;i++)
{
for(j=0;j<=1;j++)
{
printf("\n\n\t\t\tEnter [%ld] [%ld] Value:->",i,j);
scanf("%ld",&m2[i][j]);
}
}
printf("\n\n\n**********************");
printf("\n\nThe First 2X2 Matrix:\n");
printf("\n\n");
for(i=0;i<=1;i++)
{
for(j=0;j<=1;j++)
{
printf("%ld",m1[i][j]);
}
printf("\n");
}
printf("\n\nThe Second 2X2 Matrix:\n");
printf("\n\n");
for(i=0;i<=1;i++)
{
for(j=0;j<=1;j++)
{
printf("%ld",m2[i][j]);
}
printf("\n");
}
printf("\n**********************");
getch();
clrscr();
break;
case 4:
printf("\n\n\t\t\tEnter Any First 2X2 Matrix:\n");
for(i=0;i<=1;i++)
{
for(j=0;j<=1;j++)
{
printf("\n\n\t\t\tEnter [%ld] [%ld] Value:->",i,j);
scanf("%ld",&m1[i][j]);
}
}
clrscr();
printf("\n\n\t\t\tEnter Any Second 2X2 Matrix:\n");
for(i=0;i<=1;i++)
{
for(j=0;j<=1;j++)
{
printf("\n\n\t\t\tEnter [%ld] [%ld] Value:->",i,j);
scanf("%ld",&m2[i][j]);
}
}
clrscr();
printf("\n\n\n**********************");
printf("\n\nThe First 2X2 Matrix:\n");
printf("\n\n");
for(i=0;i<=1;i++)
{
for(j=0;j<=1;j++)
{
printf("[%ld]",m1[i][j]);
}
printf("\n");
}
printf("\n\nThe Second 2X2 Matrix:\n");
printf("\n\n");
for(i=0;i<=1;i++)
{
for(j=0;j<=1;j++)
{
printf("[%ld]",m2[i][j]);
}
printf("\n");
}
printf("\n\nThe Addition Of Two 2X2 Matrix:\n");
printf("\n\n");
for(i=0;i<=1;i++)
{
for(j=0;j<=1;j++)
{
printf("[%ld]",m1[i][j]+m2[i][j]);
}
printf("\n");
}
printf("\n**********************");
getch();
clrscr();
break;
case 5:
printf("\n\n\t\t\tEnter Any First 2X2 Matrix:\n");
for(i=0;i<=1;i++)
{
for(j=0;j<=1;j++)
{
printf("\n\n\t\t\tEnter [%ld] [%ld] Value:->",i,j);
scanf("%ld",&m1[i][j]);
}
}
clrscr();
printf("\n\n\t\t\tEnter Any Second 2X2 Matrix:\n");
for(i=0;i<=1;i++)
{
for(j=0;j<=1;j++)
{
printf("\n\n\t\t\tEnter [%ld] [%ld] Value:->",i,j);
scanf("%ld",&m2[i][j]);
}
}
clrscr();
printf("\n\n\n**********************");
printf("\n\nThe First 2X2 Matrix:\n");
printf("\n\n");
for(i=0;i<=1;i++)
{
for(j=0;j<=1;j++)
{
printf("[%ld]",m1[i][j]);
}
printf("\n");
}
printf("\n\nThe Second 2X2 Matrix:\n");
printf("\n\n");
for(i=0;i<=1;i++)
{
for(j=0;j<=1;j++)
{
printf("[%ld]",m2[i][j]);
}
printf("\n");
}
printf("\n\nThe Substarction Of Two 2X2 Matrix:\n");
printf("\n\n");
for(i=0;i<=1;i++)
{
for(j=0;j<=1;j++)
{
printf("[%ld]",m1[i][j]-m2[i][j]);
}
printf("\n");
}
printf("\n**********************");
getch();
clrscr();
break;
case 6:
printf("\n\n\t\t\tEnter Any First 2X2 Matrix:\n");
for(i=0;i<=1;i++)
{
for(j=0;j<=1;j++)
{
printf("\n\n\t\t\tEnter [%ld] [%ld] Value:->",i,j);
scanf("%ld",&m1[i][j]);
}
}
clrscr();
printf("\n\n\t\t\tEnter Any Second 2X2 Matrix:\n");
for(i=0;i<=1;i++)
{
for(j=0;j<=1;j++)
{
printf("\n\n\t\t\tEnter [%ld] [%ld] Value:->",i,j);
scanf("%ld",&m2[i][j]);
}
}
clrscr();
printf("\n\n\n**********************");
printf("\n\nThe First 2X2 Matrix:\n");
printf("\n\n");
for(i=0;i<=1;i++)
{
for(j=0;j<=1;j++)
{
printf("[%ld]",m1[i][j]);
}
printf("\n");
}
printf("\n\nThe Second 2X2 Matrix:\n");
printf("\n\n");
for(i=0;i<=1;i++)
{
for(j=0;j<=1;j++)
{
printf("[%ld]",m2[i][j]);
}
printf("\n");
}
for(i=0;i<=1;i++)
{
for(j=0;j<=1;j++)
{
tot=0;
for(k=0;k<=1;k++)
{
tot=tot+m1[i][k]*m2[k][j];
}
m3[i][j]=tot;
}
}
printf("\n\nMultiplication Of Two 2X2 Matrix:\n");
printf("\n\n");
for(i=0;i<=1;i++)
{
for(j=0;j<=1;j++)
{
printf("[%ld]",m3[i][j]);
}
printf("\n");
}
printf("\n**********************");
getch();
clrscr();
break;
}
}
while(ch1!=0);
THREETHREE:
clrscr();
do
{
printf("\n\n\t\t\t*******************************");
printf("\n\n\t\t\t*** THREE DIMENSION PROGRAM ***");
printf("\n\n\t\t\t*******************************");
printf("\n\n\n\n\n");
printf("\n\n\t\t\t 1:Enter Any 3X3 Matrix And Display It");
printf("\n\n\t\t\t 2:Enter Any 3X3 Matrix And Display It Transpose");
printf("\n\n\t\t\t 3:Enter Any Two 3X3 Matrix And Display It");
printf("\n\n\t\t\t 4:Enter Any Two 3X3 Matrix And Display Addition");
printf("\n\n\t\t\t 5:Enter Any Two 3X3 Matrix And Display Substraction");
printf("\n\n\t\t\t 6:Enter Any Two 3X3 Matrix And Display Multiplication");
printf("\n\n\t\t\t 7:Main Menu Of Two Dimension Array");
printf("\n\n\t\t\t 8:Main Menu Of Array");
printf("\n\n\t\t\t 9:Home Page");
printf("\n\n\t\t\t 0:EXIT");
printf("\n\n\t\t\t Select The Above Option:->");
scanf("%ld",&ch1);
if(ch1>=10)
{
printf("\n\n\n");
printf("\n\n\t\t\tPlease Select The Valid Option...!!!!");
getch();
clrscr();
goto THREETHREE;
}
if(ch1==7)
{
clrscr();
goto TWOD;
}
if(ch1==8)
{
clrscr();
goto ARRAY;
}
if(ch1==9)
{
clrscr();
goto HOME;
}
if(ch1==0)
{
printf("\n\n\t\t\tAre You Want To Exit This Program...!!!");
printf("\n\n\t\t\tContinue For Press 1,Exit For Press 0 :->");
scanf("%ld",&ch1);
if(ch1==1)
{
clrscr();
goto THREETHREE;
}
else
{
exit(0);
}
}
switch(ch1)
{
case 1:
printf("\n\n\t\t\tEnter Any 3X3 Matrix:\n");
for(i=0;i<=2;i++)
{
for(j=0;j<=2;j++)
{
printf("\n\n\t\t\tEnter [%ld] [%ld] Value:->",i,j);
scanf("%ld",&mn1[i][j]);
}
}
printf("\n\n\n**********************");
printf("\n\nThe 3X3 Matrix:\n");
printf("\n\n");
for(i=0;i<=2;i++)
{
for(j=0;j<=2;j++)
{
printf("%ld",mn1[i][j]);
}
printf("\n");
}
printf("\n**********************");
getch();
clrscr();
break;
case 2:
printf("\n\n\t\t\tEnter Any 3X3 Matrix Fo Transpose:\n");
for(i=0;i<=2;i++)
{
for(j=0;j<=2;j++)
{
printf("\n\n\t\t\tEnter [%ld] [%ld] Value:->",i,j);
scanf("%ld",&mn1[i][j]);
}
}
printf("\n\n\n**********************");
printf("\n\nThe 3X3 Transpose Matrix:\n");
printf("\n\n");
for(i=0;i<=2;i++)
{
for(j=0;j<=2;j++)
{
printf("[%ld]",mn1[j][i]);
}
printf("\n");
}
printf("\n**********************");
getch();
clrscr();
break;
case 3:
printf("\n\n\t\t\tEnter Any First 3X3 Matrix:\n");
for(i=0;i<=2;i++)
{
for(j=0;j<=2;j++)
{
printf("\n\n\t\t\tEnter [%ld] [%ld] Value:->",i,j);
scanf("%ld",&mn1[i][j]);
}
}
clrscr();
printf("\n\n\t\t\tEnter Any Second 3X3 Matrix:\n");
for(i=0;i<=2;i++)
{
for(j=0;j<=2;j++)
{
printf("\n\n\t\t\tEnter [%ld] [%ld] Value:->",i,j);
scanf("%ld",&mn2[i][j]);
}
}
clrscr();
printf("\n\n\n**********************");
printf("\n\nThe First 3X3 Matrix:\n");
printf("\n\n");
for(i=0;i<=2;i++)
{
for(j=0;j<=2;j++)
{
printf("[%ld]",mn1[i][j]);
}
printf("\n");
}
printf("\n\nThe Second 3X3 Matrix:\n");
printf("\n\n");
for(i=0;i<=2;i++)
{
for(j=0;j<=2;j++)
{
printf("[%ld]",mn2[i][j]);
}
printf("\n");
}
printf("\n**********************");
getch();
clrscr();
break;
case 4:
printf("\n\n\t\t\tEnter Any First 3X3 Matrix:\n");
for(i=0;i<=2;i++)
{
for(j=0;j<=2;j++)
{
printf("\n\n\t\t\tEnter [%ld] [%ld] Value:->",i,j);
scanf("%ld",&mn1[i][j]);
}
}
clrscr();
printf("\n\n\t\t\tEnter Any Second 3X3 Matrix:\n");
for(i=0;i<=2;i++)
{
for(j=0;j<=2;j++)
{
printf("\n\n\t\t\tEnter [%ld] [%ld] Value:->",i,j);
scanf("%ld",&mn2[i][j]);
}
}
clrscr();
printf("\n\n\n**********************");
printf("\n\nThe First 3X3 Matrix:\n");
printf("\n\n");
for(i=0;i<=2;i++)
{
for(j=0;j<=2;j++)
{
printf("[%ld]",mn1[i][j]);
}
printf("\n");
}
printf("\n\nThe Second 3X3 Matrix:\n");
printf("\n\n");
for(i=0;i<=2;i++)
{
for(j=0;j<=2;j++)
{
printf("[%ld]",mn2[i][j]);
}
printf("\n");
}
printf("\n\nThe Addition Of Two 3X3 Matrix:\n");
printf("\n\n");
for(i=0;i<=2;i++)
{
for(j=0;j<=2;j++)
{
printf("[%ld]",mn1[i][j]+mn2[i][j]);
}
printf("\n");
}
printf("\n**********************");
getch();
clrscr();
break;
case 5:
printf("\n\n\t\t\tEnter Any First 3X3 Matrix:\n");
for(i=0;i<=2;i++)
{
for(j=0;j<=2;j++)
{
printf("\n\n\t\t\tEnter [%ld] [%ld] Value:->",i,j);
scanf("%ld",&mn1[i][j]);
}
}
clrscr();
printf("\n\n\t\t\tEnter Any Second 3X3 Matrix:\n");
for(i=0;i<=2;i++)
{
for(j=0;j<=2;j++)
{
printf("\n\n\t\t\tEnter [%ld] [%ld] Value:->",i,j);
scanf("%ld",&mn2[i][j]);
}
}
clrscr();
printf("\n\n\n**********************");
printf("\n\nThe First 3X3 Matrix:\n");
printf("\n\n");
for(i=0;i<=2;i++)
{
for(j=0;j<=2;j++)
{
printf("[%ld]",mn1[i][j]);
}
printf("\n");
}
printf("\n\nThe Second 3X3 Matrix:\n");
printf("\n\n");
for(i=0;i<=2;i++)
{
for(j=0;j<=2;j++)
{
printf("[%ld]",mn2[i][j]);
}
printf("\n");
}
printf("\n\nThe Substarction Of Two 3X3 Matrix:\n");
printf("\n\n");
for(i=0;i<=2;i++)
{
for(j=0;j<=2;j++)
{
printf("[%ld]",mn1[i][j]-mn2[i][j]);
}
printf("\n");
}
printf("\n**********************");
getch();
clrscr();
break;
case 6:
printf("\n\n\t\t\tEnter Any First 3X3 Matrix:\n");
for(i=0;i<=2;i++)
{
for(j=0;j<=2;j++)
{
printf("\n\n\t\t\tEnter [%ld] [%ld] Value:->",i,j);
scanf("%ld",&mn1[i][j]);
}
}
clrscr();
printf("\n\n\t\t\tEnter Any Second 3X3 Matrix:\n");
for(i=0;i<=2;i++)
{
for(j=0;j<=2;j++)
{
printf("\n\n\t\t\tEnter [%ld] [%ld] Value:->",i,j);
scanf("%ld",&mn2[i][j]);
}
}
clrscr();
printf("\n\n\n**********************");
printf("\n\nThe First 3X3 Matrix:\n");
printf("\n\n");
for(i=0;i<=2;i++)
{
for(j=0;j<=2;j++)
{
printf("[%ld]",mn1[i][j]);
}
printf("\n");
}
printf("\n\nThe Second 3X3 Matrix:\n");
printf("\n\n");
for(i=0;i<=2;i++)
{
for(j=0;j<=2;j++)
{
printf("[%ld]",mn2[i][j]);
}
printf("\n");
}
for(i=0;i<=2;i++)
{
for(j=0;j<=2;j++)
{
tot=0;
for(k=0;k<=2;k++)
{
tot=tot+mn1[i][k]*mn2[k][j];
}
mn3[i][j]=tot;
}
}
printf("\n\nMultiplication Of Two 3X3 Matrix:\n");
printf("\n\n");
for(i=0;i<=2;i++)
{
for(j=0;j<=2;j++)
{
printf("[%ld]",mn3[i][j]);
}
printf("\n");
}
printf("\n**********************");
getch();
clrscr();
break;
}
}
while(ch1!=0);
//===================TWO Dimension Complete====================
//===================Multidimension Start======================
MULTID:
clrscr();
do
{
printf("\n\n\t\t\t*******************************");
printf("\n\n\t\t\t*** MULTI DIMENSION PROGRAM ***");
printf("\n\n\t\t\t*******************************");
printf("\n\n\n\n\n");
printf("\n\n\t\t 1:To Enter 2X2X2 Multidimension Array And Display It");
printf("\n\n\t\t 2:To Enter 3X3X3 Multidimension Array And Display");
printf("\n\n\t\t 3:Main Menu Of Array");
printf("\n\n\t\t 4:Home Page");
printf("\n\n\t\t 0:Exit");
printf("\n\n\t\t Select The Above Option:->");
scanf("%ld",&ch1);
if(ch1>=5)
{
printf("\n\n\n");
printf("\n\n\t\t\tPlease Select The Valid Option...!!!!");
getch();
clrscr();
goto MULTID;
}
if(ch1==3)
{
clrscr();
goto ARRAY;
}
if(ch1==4)
{
clrscr();
goto HOME;
}
if(ch1==0)
{
printf("\n\n\t\t\tAre You Want To Exit This Program...!!!");
printf("\n\n\t\t\tContinue For Press 1,Exit For Press 0 :->");
scanf("%ld",&ch1);
if(ch1==1)
{
clrscr();
goto MULTID;
}
else
{
exit(0);
}
}
switch(ch1)
{
case 1:
printf("\n\n\t\t\tEnter Any 2X2X2 Matrix:\n");
for(i=0;i<=1;i++)
{
for(j=0;j<=1;j++)
{
for(k=0;k<=1;k++)
{
printf("\n\n\t\t\tEnter [%ld] [%ld] [%ld] Value:->",i,j,k);
scanf("%ld",&mt1[i][j][k]);
}
}
}
clrscr();
printf("\n\n\n**********************");
printf("\n\nThe 2X2X2 Matrix:\n");
printf("\n\n");
for(i=0;i<=1;i++)
{
for(j=0;j<=1;j++)
{
for(k=0;k<=1;k++)
{
printf("[%ld]",mt1[i][j][k]);
}
}
printf("\n");
}
printf("\n**********************");
getch();
clrscr();
break;
case 2:
printf("\n\n\t\t\tEnter Any 2X2X2 Matrix:\n");
for(i=0;i<=2;i++)
{
for(j=0;j<=2;j++)
{
for(k=0;k<=2;k++)
{
printf("\n\n\t\t\tEnter [%ld] [%ld] [%ld] Value:->",i,j,k);
scanf("%ld",&t1[i][j][k]);
}
}
}
clrscr();
printf("\n\n\n**********************");
printf("\n\nThe 3X3X3 Matrix:\n");
printf("\n\n");
for(i=0;i<=2;i++)
{
for(j=0;j<=2;j++)
{
for(k=0;k<=2;k++)
{
printf("[%ld]",t1[i][j][k]);
}
}
printf("\n");
}
printf("\n**********************");
getch();
clrscr();
break;
}
}
while(ch1!=0);
//===================Complete ARRAY====================
//==================Structure Starting=================
STRUCTURE:
clrscr();
printf("\n\n\t\t\t*****************************");
printf("\n\n\t\t\t***** STRUCTURE PROGRAM *****");
printf("\n\n\t\t\t*****************************");
printf("\n\n\n\n\n");
printf("\n\n\t\t\t 1:->Simple Program Of Structure");
printf("\n\n\t\t\t 2:->Multi Structure Program");
printf("\n\n\t\t\t 4:->Main Index");
printf("\n\n\t\t\t 5:->Sub Index");
printf("\n\n\t\t\t 6:->Home Page");
printf("\n\n\t\t\t 0:->EXIT");
printf("\n\n\t\t\t Select The Above Option:->");
scanf("%ld",&ch1);
if(ch1==2)
{
goto MULTISTRUCT;
}
if(ch1==6)
{
clrscr();
goto HOME;
}
if(ch1>=7)
{
printf("\n\n\t\t\t\tPlease Select The Valid Option...!!!");
getch();
clrscr();
goto STRUCTURE;
}
if(ch1==4)
{
clrscr();
goto FY;
}
if(ch==5)
{
clrscr();
goto NUMERIC;
}
if(ch1==0)
{
printf("\n\n\t\t\tAre You Want To Exit This Program...!!!");
printf("\n\n\t\t\tContinue For Press 1,Exit For Press 0 :->");
scanf("%ld",&ch1);
if(ch1==1)
{
clrscr();
goto STRUCTURE;
}
else
{
exit(0);
}
}
if(ch1==1)
{
goto SIMPLESTRUCT;
}
SIMPLESTRUCT:
clrscr();
do
{
printf("\n\n\t\t\t********************************");
printf("\n\n\t\t\t*** SIMPLE STRUCTURE PROGRAM ***");
printf("\n\n\t\t\t********************************");
printf("\n\n\n\n\n");
printf("\n\n\t\t\t 1:Enter Employee No,Name,Salay And Display");
printf("\n\n\t\t\t 2:Enter Student Name,No,College Name And Display");
printf("\n\n\t\t\t 3:Enter Student Name,Roll No,Three Subject Marks And");
printf("\n\n\t\t\t Display Total,Persentage,Class");
printf("\n\n\t\t\t 4:Home Page");
printf("\n\n\t\t\t 5:Main Index");
printf("\n\n\t\t\t 6:Sub Index");
printf("\n\n\t\t\t 7:Main Menu Of Structor");
printf("\n\n\t\t\t 0:EXIT");
printf("\n\n\t\t\t Select The Above Option:->");
scanf("%ld",&ch1);
if(ch1==7)
{
clrscr();
goto STRUCTURE;
}
if(ch1>=8)
{
printf("\n\n\t\t\t\tPlease Select The Valid Option...!!!");
getch();
clrscr();
goto SIMPLESTRUCT;
}
if(ch1==4)
{
clrscr();
goto HOME;
}
if(ch1==5)
{
clrscr();
goto FY;
}
if(ch1==6)
{
clrscr();
goto NUMERIC;
}
if(ch1==0)
{
printf("\n\n\t\t\tAre You Want To Exit This Program...!!!");
printf("\n\n\t\t\tContinue For Press 1,Exit For Press 0 :->");
scanf("%ld",&ch1);
if(ch1==1)
{
clrscr();
goto SIMPLESTRUCT;
}
else
{
exit(0);
}
}
switch(ch1)
{
case 1:
{
struct emp e;
printf("\n\n\t\t\tEnter The Employee Number:->");
scanf("%ld",&e.no);
printf("\n\n\t\t\tEnter The Employee Name:->");
scanf("%s",&e.name);
printf("\n\n\t\t\tEnter The Employee Salary:->");
scanf("%ld",&e.salary);
clrscr();
printf("\n\n\t\t\t************************************");
printf("\n\n\t\t\t\tEmployee Detail");
printf("\n\n\t\t\t************************************");
printf("\n\n\n");
printf("\n\n\t\t\t\tEmployee Number:->%ld",e.no);
printf("\n\n\t\t\t\tEmployee Name :->%s",e.name);
printf("\n\n\t\t\t\tEmployee Salary:->%ld",e.salary);
printf("\n\n\n");
printf("\n\n\t\t\t************************************");
}
getch();
clrscr();
break;
case 2:
{
struct emp e;
printf("\n\n\t\t\tEnter The Student Number:->");
scanf("%ld",&e.no);
printf("\n\n\t\t\tEnter The Student Name:->");
scanf("%s",&e.name);
printf("\n\n\t\t\tEnter The College Name:->");
scanf("%s",&e.name1);
clrscr();
printf("\n\n\t\t\t************************************");
printf("\n\n\t\t\t\tStudent Detail");
printf("\n\n\t\t\t************************************");
printf("\n\n\n");
printf("\n\n\t\t\tStudent Number:->%ld",e.no);
printf("\n\n\t\t\tStudent Name :->%s",e.name);
printf("\n\n\t\t\tCollege Name :->%s",e.name1);
printf("\n\n\t\t\t************************************");
}
getch();
clrscr();
break;
case 3:
{
struct emp e;
printf("\n\n\t\t\tEnter The Student Roll Number:->");
scanf("%ld",&e.no);
printf("\n\n\t\t\tEnter The Student Name:->");
scanf("%s",&e.name);
printf("\n\n\t\t\tEnter The College Name:->");
scanf("%s",&e.name1);
printf("\n\n\t\t\tEnter First Subject Marks:->");
scanf("%f",&e.s1);
printf("\n\n\t\t\tEnter The Second Subject Marks:->");
scanf("%f",&e.s2);
printf("\n\n\t\t\tEnter The Third Subject Marks:->");
scanf("%f",&e.s3);
e.tot=e.s1+e.s2+e.s3;
e.per=e.tot/3;
clrscr();
printf("\n\n\t\t\t************************************");
printf("\n\n\t\t\t\tStudent Detail");
printf("\n\n\t\t\t************************************");
printf("\n\n\n");
printf("\n\n\t\t\tStudent Number :->%ld",e.no);
printf("\n\n\t\t\tStudent Name :->%s",e.name);
printf("\n\n\t\t\tCollege Name :->%s",e.name1);
printf("\n\n\t\t\tFirst Subject :->%f",e.s1);
printf("\n\n\t\t\tSecond Subject :->%f",e.s2);
printf("\n\n\t\t\tThird Subject :->%f",e.s3);
printf("\n\n\t\t\tThe Total :->%ld",e.tot);
printf("\n\n\t\t\tThe Persentage :->%f",e.per);
printf("\n\n\t\t\tThe Class :->");
if(e.per>=70)
{
printf("Distiction");
}
else if(e.per>=60)
{
printf("First");
}
else if(e.per>=50)
{
printf("Second");
}
else if(e.per>=40)
{
printf("Pass");
}
else
{
printf("Fail");
}
printf("\n\n\t\t\t************************************");
}
getch();
clrscr();
break;
}
}
while(ch1!=0);
MULTISTRUCT:
clrscr();
do
{
printf("\n\n\t\t\t*********************************");
printf("\n\n\t\t\t**** MULTI STRUCTURE PROGRAM ****");
printf("\n\n\t\t\t*********************************");
printf("\n\n\n\n\n");
printf("\n\n\t\t 1:Enter Student Name,Number,College Name,Three Subject Marks");
printf("\n\n\t\t And Display Total,persentage");
printf("\n\n\t\t 2:Enter Customer Name,Id,Rupee,A/c Type And Display It");
printf("\n\n\t\t 3:Main Menu Of Structure");
printf("\n\n\t\t 4:Home Page");
printf("\n\n\t\t 0:EXIT");
printf("\n\n\t\t Select The Above Option:->");
scanf("%ld",&ch1);
if(ch1>=5)
{
printf("\n\n\t\t\tPlease Select The Valid Option...!!!");
getch();
clrscr();
goto MULTISTRUCT;
}
if(ch1==3)
{
clrscr();
goto STRUCTURE;
}
if(ch1==4)
{
clrscr();
goto HOME;
}
if(ch1==0)
{
printf("\n\n\t\t\tAre You Want To Exit This Program...!!!");
printf("\n\n\t\t\tContinue For Press 1,Exit For Press 0 :->");
scanf("%ld",&ch1);
if(ch1==1)
{
clrscr();
goto MULTISTRUCT;
}
else
{
exit(0);
}
}
switch(ch1)
{
case 1:
{
struct student st1;
struct subject su1;
printf("\n\n\t\t\tEnter Student Number:->");
scanf("%ld",&st1.no);
printf("\n\n\t\t\tEnter Student Name:->");
scanf("%s",&st1.na1);
printf("\n\n\t\t\tEnter College Name:->");
scanf("%s",&st1.na2);
printf("\n\n\t\t\tEnter First Subject Marks:->");
scanf("%ld",&st1.su1.s1);
printf("\n\n\t\t\tEnter Second Subject Marks:->");
scanf("%ld",&st1.su1.s2);
printf("\n\n\t\t\tEnter Third Subject Marks:->");
scanf("%ld",&st1.su1.s3);
st1.su1.tot=st1.su1.s1+st1.su1.s2+st1.su1.s3;
st1.su1.per=st1.su1.tot/3;
clrscr();
printf("\n\n\t\t\t************************************");
printf("\n\n\t\t\t\tStudent Result Detail");
printf("\n\n\t\t\t************************************");
printf("\n\n\n");
printf("\n\n\t\t\tStudent Number :->%ld",st1.no);
printf("\n\n\t\t\tStudent Name :->%s",st1.na1);
printf("\n\n\t\t\tCollege Name :->%s",st1.na2);
printf("\n\n\t\t\tFirst Subject :->%ld",st1.su1.s1);
printf("\n\n\t\t\tSecond Subject :->%ld",st1.su1.s2);
printf("\n\n\t\t\tThird Subject :->%ld",st1.su1.s3);
printf("\n\n\t\t\tThe Total :->%ld",st1.su1.tot);
printf("\n\n\t\t\tThe Persentage :->%f",st1.su1.per);
printf("\n\n\t\t\tThe Class :->");
if(st1.su1.per>=70)
{
printf("Distiction");
}
else if(st1.su1.per>=60)
{
printf("First");
}
else if(st1.su1.per>=50)
{
printf("Second");
}
else if(st1.su1.per>=40)
{
printf("Pass");
}
else
{
printf("Fail");
}
printf("\n\n\t\t\t************************************");
}
getch();
clrscr();
break;
case 2:
{
struct student st1;
struct subject su1;
printf("\n\n\t\t\tEnter Customer ID:->");
scanf("%ld",&st1.id);
printf("\n\n\t\t\tEnter Customer Name:->");
scanf("%s",&st1.na);
printf("\n\n\t\t\tEnter Acount Type:->");
scanf("%s",&st1.ac);
printf("\n\n\t\t\tEnter Total Rupee:->");
scanf("%f",&st1.su1.rupee);
clrscr();
printf("\n\n\t\t\t************************************");
printf("\n\n\t\t\t\tCustomer Account Detail");
printf("\n\n\t\t\t************************************");
printf("\n\n\n");
printf("\n\n\t\t\tCustomer ID :->%ld",st1.id);
printf("\n\n\t\t\tCustomer Name :->%s",st1.na);
printf("\n\n\t\t\tAccount Type :->%s",st1.ac);
printf("\n\n\t\t\tTotal Rupee :->%f",st1.su1.rupee);
printf("\n\n\t\t\t************************************");
}
getch();
clrscr();
break;
}
}
while(ch1!=0);
//====================MULTI Structer Complete==================
EXIT:
exit(0);
while(ch1!=0);
}
Free C Language projects
Reviewed by Unknown
on
8:04:00 PM
Rating:
c programming example codes to students
ReplyDeletec code | calculate Area of a Polygon