SlideShare a Scribd company logo
By:KAPIL PANDIT
1 | P a g e
/*program to convert 4 digit integer number and display
the word equivalent*/
By:KAPIL PANDIT
2 | P a g e
CODE:
#include<stdio.h>
main()
{
int n,i,j,a[5];
char *num[11]={"zero","one","two","three","four","five","six","seven",
"eight","nine",};
char*two[10]={"ten","eleven","twelve","thirteen","fourteen","fiveteen"
,"sixteen","seventeen","eighteen","ninteen"};
char *three[10]={"twenty","thirty","fourty","fifty","sixty","seventy",
"eighty","ninty"};
int ch;
clrscr();
do
{
fflush(stdin);
printf("Enter the 4 digit number:");
scanf("%d",&n);
i=0;
printf("In Word:");
while(n>0)
{
a[i]=n%10;
i++;
n=n/10;
}
j=i-1;
printf("%s thousand ",num[a[j]]);j--;
if(a[j]>0)
{
printf("%s hundred ",num[a[j]]);j--;
if(a[j]>0)
{
if(a[j]>=2)
{
printf("%s ",three[a[j]-2]);j--;
if(a[j]!=0)
printf("%s ",num[a[j]]);j--;
}
else
{
if(a[j]>1||(a[j]==1&&a[j-1]>=0))
printf("%s ",two[a[j-1]]);
else
{
printf("%s ",num[a[j]]);j--;
printf("%s ",num[a[j]]);j--;
}
}
By:KAPIL PANDIT
3 | P a g e
}
}
printf("npress any key to continue...............");
printf("or press 1 to exit:");
fflush(stdin);
scanf("%d",&ch);
}while(ch!=1);
getch();
return 0;
}

More Related Content

What's hot

Shan
ShanShan
Shan
mohdshanu
 
Tail Recursion in data structure
Tail Recursion in data structureTail Recursion in data structure
Tail Recursion in data structure
Rumman Ansari
 
C++ 4
C++ 4C++ 4
C++ 4
Syed Umair
 
Practical no 4
Practical no 4Practical no 4
Practical no 4
Kshitija Dalvi
 
Program in ‘C’ language to implement linear search using pointers
Program in ‘C’ language to implement linear search using pointersProgram in ‘C’ language to implement linear search using pointers
Program in ‘C’ language to implement linear search using pointers
Dr. Loganathan R
 
A.P.S.E PRACTICAL FILE, NIT KURUKSHETRA
A.P.S.E PRACTICAL FILE, NIT KURUKSHETRA A.P.S.E PRACTICAL FILE, NIT KURUKSHETRA
A.P.S.E PRACTICAL FILE, NIT KURUKSHETRA
AKSHAY SACHAN
 
Factorial Program in C
Factorial Program in CFactorial Program in C
Factorial Program in C
Hitesh Kumar
 
Circular queues
Circular queuesCircular queues
Circular queues
Ssankett Negi
 
C programs Set 2
C programs Set 2C programs Set 2
C programs Set 2
Koshy Geoji
 
Bcsl 033 data and file structures lab s1-1
Bcsl 033 data and file structures lab s1-1Bcsl 033 data and file structures lab s1-1
Bcsl 033 data and file structures lab s1-1
Dr. Loganathan R
 
Hotel Management In C++
Hotel Management In C++Hotel Management In C++
Hotel Management In C++
Amish Mhatre
 
Prefix Postfix
Prefix PostfixPrefix Postfix
C test
C testC test
test
testtest
Practical no 3
Practical no 3Practical no 3
Practical no 3
Kshitija Dalvi
 
Bti1022 lab sheet 9 10
Bti1022 lab sheet 9 10Bti1022 lab sheet 9 10
Bti1022 lab sheet 9 10
alish sha
 
Ffffffffffff
FfffffffffffFfffffffffff
Ffffffffffff
mohdshanu
 
Lecture 3 c++
Lecture 3 c++Lecture 3 c++
Lecture 3 c++
emailharmeet
 
Array using recursion
Array using recursionArray using recursion
Array using recursion
Swarup Boro
 
C program to add two numbers
C program to add two numbers C program to add two numbers
C program to add two numbers
mohdshanu
 

What's hot (20)

Shan
ShanShan
Shan
 
Tail Recursion in data structure
Tail Recursion in data structureTail Recursion in data structure
Tail Recursion in data structure
 
C++ 4
C++ 4C++ 4
C++ 4
 
Practical no 4
Practical no 4Practical no 4
Practical no 4
 
Program in ‘C’ language to implement linear search using pointers
Program in ‘C’ language to implement linear search using pointersProgram in ‘C’ language to implement linear search using pointers
Program in ‘C’ language to implement linear search using pointers
 
A.P.S.E PRACTICAL FILE, NIT KURUKSHETRA
A.P.S.E PRACTICAL FILE, NIT KURUKSHETRA A.P.S.E PRACTICAL FILE, NIT KURUKSHETRA
A.P.S.E PRACTICAL FILE, NIT KURUKSHETRA
 
Factorial Program in C
Factorial Program in CFactorial Program in C
Factorial Program in C
 
Circular queues
Circular queuesCircular queues
Circular queues
 
C programs Set 2
C programs Set 2C programs Set 2
C programs Set 2
 
Bcsl 033 data and file structures lab s1-1
Bcsl 033 data and file structures lab s1-1Bcsl 033 data and file structures lab s1-1
Bcsl 033 data and file structures lab s1-1
 
Hotel Management In C++
Hotel Management In C++Hotel Management In C++
Hotel Management In C++
 
Prefix Postfix
Prefix PostfixPrefix Postfix
Prefix Postfix
 
C test
C testC test
C test
 
test
testtest
test
 
Practical no 3
Practical no 3Practical no 3
Practical no 3
 
Bti1022 lab sheet 9 10
Bti1022 lab sheet 9 10Bti1022 lab sheet 9 10
Bti1022 lab sheet 9 10
 
Ffffffffffff
FfffffffffffFfffffffffff
Ffffffffffff
 
Lecture 3 c++
Lecture 3 c++Lecture 3 c++
Lecture 3 c++
 
Array using recursion
Array using recursionArray using recursion
Array using recursion
 
C program to add two numbers
C program to add two numbers C program to add two numbers
C program to add two numbers
 

Viewers also liked

WAP to preform insertion sort,merge sort, quick sort and also find cost & com...
WAP to preform insertion sort,merge sort, quick sort and also find cost & com...WAP to preform insertion sort,merge sort, quick sort and also find cost & com...
WAP to preform insertion sort,merge sort, quick sort and also find cost & com...
Kapil Pandit
 
4
44
Application Form
Application FormApplication Form
Application Form
Kapil Pandit
 
Herbolax tablets from himalaya
Herbolax tablets from himalayaHerbolax tablets from himalaya
Herbolax tablets from himalaya
Michael Bennet
 
Programació aula oberta
Programació aula obertaProgramació aula oberta
Programació aula obertamercerojosole
 
C prpgram code of design google web page
C prpgram code of design google web pageC prpgram code of design google web page
C prpgram code of design google web page
Kapil Pandit
 
YAWYT
YAWYTYAWYT
YAWYT
awing3
 
Himalaya skin care cream
Himalaya skin care creamHimalaya skin care cream
Himalaya skin care cream
Michael Bennet
 
3G component
3G component3G component
3G component
Jamal Jamali
 
Introduction to wavelet transform with applications to dsp
Introduction to wavelet transform with applications to dspIntroduction to wavelet transform with applications to dsp
Introduction to wavelet transform with applications to dsp
Jamal Jamali
 
Prime Meridian,Equator, Latitude and longitude
Prime Meridian,Equator, Latitude and longitude Prime Meridian,Equator, Latitude and longitude
Prime Meridian,Equator, Latitude and longitude
Jamal Jamali
 
Parabolic antenna
Parabolic antennaParabolic antenna
Parabolic antenna
Jamal Jamali
 

Viewers also liked (14)

WAP to preform insertion sort,merge sort, quick sort and also find cost & com...
WAP to preform insertion sort,merge sort, quick sort and also find cost & com...WAP to preform insertion sort,merge sort, quick sort and also find cost & com...
WAP to preform insertion sort,merge sort, quick sort and also find cost & com...
 
Ekosistem
EkosistemEkosistem
Ekosistem
 
4
44
4
 
Application Form
Application FormApplication Form
Application Form
 
Herbolax tablets from himalaya
Herbolax tablets from himalayaHerbolax tablets from himalaya
Herbolax tablets from himalaya
 
Programació aula oberta
Programació aula obertaProgramació aula oberta
Programació aula oberta
 
Penyaringan
PenyaringanPenyaringan
Penyaringan
 
C prpgram code of design google web page
C prpgram code of design google web pageC prpgram code of design google web page
C prpgram code of design google web page
 
YAWYT
YAWYTYAWYT
YAWYT
 
Himalaya skin care cream
Himalaya skin care creamHimalaya skin care cream
Himalaya skin care cream
 
3G component
3G component3G component
3G component
 
Introduction to wavelet transform with applications to dsp
Introduction to wavelet transform with applications to dspIntroduction to wavelet transform with applications to dsp
Introduction to wavelet transform with applications to dsp
 
Prime Meridian,Equator, Latitude and longitude
Prime Meridian,Equator, Latitude and longitude Prime Meridian,Equator, Latitude and longitude
Prime Meridian,Equator, Latitude and longitude
 
Parabolic antenna
Parabolic antennaParabolic antenna
Parabolic antenna
 

Similar to Program to convert 4 digit integer number and display

Cd practical file (1) start se
Cd practical file (1) start seCd practical file (1) start se
Cd practical file (1) start se
dalipkumar64
 
Practical write a c program to reverse a given number
Practical write a c program to reverse a given numberPractical write a c program to reverse a given number
Practical write a c program to reverse a given number
Mainak Sasmal
 
Practical write a c program to reverse a given number
Practical write a c program to reverse a given numberPractical write a c program to reverse a given number
Practical write a c program to reverse a given number
Mainak Sasmal
 
C
CC
Hargun
HargunHargun
Data structure week 3
Data structure week 3Data structure week 3
Data structure week 3
karmuhtam
 
Effective C#
Effective C#Effective C#
Effective C#
lantoli
 
Program flowchart
Program flowchartProgram flowchart
Program flowchart
Sowri Rajan
 
Common problems solving using c
Common problems solving using cCommon problems solving using c
Common problems solving using c
ArghodeepPaul
 
C program
C programC program
C program
Komal Singh
 
C basics
C basicsC basics
C basics
MSc CST
 
Dotnet 18
Dotnet 18Dotnet 18
Dotnet 18
dhruvesh718
 
135
135135
Lab loop
Lab loopLab loop
Lab loop
Manode Boonpeng
 
Programming with GUTs
Programming with GUTsProgramming with GUTs
Programming with GUTs
Kevlin Henney
 
week-8x
week-8xweek-8x
Chapter 8 c solution
Chapter 8 c solutionChapter 8 c solution
Chapter 8 c solution
Azhar Javed
 
week-6x
week-6xweek-6x
54602399 c-examples-51-to-108-programe-ee01083101
54602399 c-examples-51-to-108-programe-ee0108310154602399 c-examples-51-to-108-programe-ee01083101
54602399 c-examples-51-to-108-programe-ee01083101
premrings
 
C programms
C programmsC programms
C programms
Mukund Gandrakota
 

Similar to Program to convert 4 digit integer number and display (20)

Cd practical file (1) start se
Cd practical file (1) start seCd practical file (1) start se
Cd practical file (1) start se
 
Practical write a c program to reverse a given number
Practical write a c program to reverse a given numberPractical write a c program to reverse a given number
Practical write a c program to reverse a given number
 
Practical write a c program to reverse a given number
Practical write a c program to reverse a given numberPractical write a c program to reverse a given number
Practical write a c program to reverse a given number
 
C
CC
C
 
Hargun
HargunHargun
Hargun
 
Data structure week 3
Data structure week 3Data structure week 3
Data structure week 3
 
Effective C#
Effective C#Effective C#
Effective C#
 
Program flowchart
Program flowchartProgram flowchart
Program flowchart
 
Common problems solving using c
Common problems solving using cCommon problems solving using c
Common problems solving using c
 
C program
C programC program
C program
 
C basics
C basicsC basics
C basics
 
Dotnet 18
Dotnet 18Dotnet 18
Dotnet 18
 
135
135135
135
 
Lab loop
Lab loopLab loop
Lab loop
 
Programming with GUTs
Programming with GUTsProgramming with GUTs
Programming with GUTs
 
week-8x
week-8xweek-8x
week-8x
 
Chapter 8 c solution
Chapter 8 c solutionChapter 8 c solution
Chapter 8 c solution
 
week-6x
week-6xweek-6x
week-6x
 
54602399 c-examples-51-to-108-programe-ee01083101
54602399 c-examples-51-to-108-programe-ee0108310154602399 c-examples-51-to-108-programe-ee01083101
54602399 c-examples-51-to-108-programe-ee01083101
 
C programms
C programmsC programms
C programms
 

Recently uploaded

Software Quality Assurance-se412-v11.ppt
Software Quality Assurance-se412-v11.pptSoftware Quality Assurance-se412-v11.ppt
Software Quality Assurance-se412-v11.ppt
TaghreedAltamimi
 
Data Control Language.pptx Data Control Language.pptx
Data Control Language.pptx Data Control Language.pptxData Control Language.pptx Data Control Language.pptx
Data Control Language.pptx Data Control Language.pptx
ramrag33
 
Material for memory and display system h
Material for memory and display system hMaterial for memory and display system h
Material for memory and display system h
gowrishankartb2005
 
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Sinan KOZAK
 
22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt
KrishnaveniKrishnara1
 
Properties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptxProperties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptx
MDSABBIROJJAMANPAYEL
 
Embedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoringEmbedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoring
IJECEIAES
 
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
IJECEIAES
 
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.pptUnit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
KrishnaveniKrishnara1
 
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
shadow0702a
 
Certificates - Mahmoud Mohamed Moursi Ahmed
Certificates - Mahmoud Mohamed Moursi AhmedCertificates - Mahmoud Mohamed Moursi Ahmed
Certificates - Mahmoud Mohamed Moursi Ahmed
Mahmoud Morsy
 
CEC 352 - SATELLITE COMMUNICATION UNIT 1
CEC 352 - SATELLITE COMMUNICATION UNIT 1CEC 352 - SATELLITE COMMUNICATION UNIT 1
CEC 352 - SATELLITE COMMUNICATION UNIT 1
PKavitha10
 
BRAIN TUMOR DETECTION for seminar ppt.pdf
BRAIN TUMOR DETECTION for seminar ppt.pdfBRAIN TUMOR DETECTION for seminar ppt.pdf
BRAIN TUMOR DETECTION for seminar ppt.pdf
LAXMAREDDY22
 
Welding Metallurgy Ferrous Materials.pdf
Welding Metallurgy Ferrous Materials.pdfWelding Metallurgy Ferrous Materials.pdf
Welding Metallurgy Ferrous Materials.pdf
AjmalKhan50578
 
artificial intelligence and data science contents.pptx
artificial intelligence and data science contents.pptxartificial intelligence and data science contents.pptx
artificial intelligence and data science contents.pptx
GauravCar
 
Applications of artificial Intelligence in Mechanical Engineering.pdf
Applications of artificial Intelligence in Mechanical Engineering.pdfApplications of artificial Intelligence in Mechanical Engineering.pdf
Applications of artificial Intelligence in Mechanical Engineering.pdf
Atif Razi
 
Generative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of contentGenerative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of content
Hitesh Mohapatra
 
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
insn4465
 
Comparative analysis between traditional aquaponics and reconstructed aquapon...
Comparative analysis between traditional aquaponics and reconstructed aquapon...Comparative analysis between traditional aquaponics and reconstructed aquapon...
Comparative analysis between traditional aquaponics and reconstructed aquapon...
bijceesjournal
 
Manufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptxManufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptx
Madan Karki
 

Recently uploaded (20)

Software Quality Assurance-se412-v11.ppt
Software Quality Assurance-se412-v11.pptSoftware Quality Assurance-se412-v11.ppt
Software Quality Assurance-se412-v11.ppt
 
Data Control Language.pptx Data Control Language.pptx
Data Control Language.pptx Data Control Language.pptxData Control Language.pptx Data Control Language.pptx
Data Control Language.pptx Data Control Language.pptx
 
Material for memory and display system h
Material for memory and display system hMaterial for memory and display system h
Material for memory and display system h
 
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
 
22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt
 
Properties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptxProperties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptx
 
Embedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoringEmbedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoring
 
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
 
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.pptUnit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
 
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
 
Certificates - Mahmoud Mohamed Moursi Ahmed
Certificates - Mahmoud Mohamed Moursi AhmedCertificates - Mahmoud Mohamed Moursi Ahmed
Certificates - Mahmoud Mohamed Moursi Ahmed
 
CEC 352 - SATELLITE COMMUNICATION UNIT 1
CEC 352 - SATELLITE COMMUNICATION UNIT 1CEC 352 - SATELLITE COMMUNICATION UNIT 1
CEC 352 - SATELLITE COMMUNICATION UNIT 1
 
BRAIN TUMOR DETECTION for seminar ppt.pdf
BRAIN TUMOR DETECTION for seminar ppt.pdfBRAIN TUMOR DETECTION for seminar ppt.pdf
BRAIN TUMOR DETECTION for seminar ppt.pdf
 
Welding Metallurgy Ferrous Materials.pdf
Welding Metallurgy Ferrous Materials.pdfWelding Metallurgy Ferrous Materials.pdf
Welding Metallurgy Ferrous Materials.pdf
 
artificial intelligence and data science contents.pptx
artificial intelligence and data science contents.pptxartificial intelligence and data science contents.pptx
artificial intelligence and data science contents.pptx
 
Applications of artificial Intelligence in Mechanical Engineering.pdf
Applications of artificial Intelligence in Mechanical Engineering.pdfApplications of artificial Intelligence in Mechanical Engineering.pdf
Applications of artificial Intelligence in Mechanical Engineering.pdf
 
Generative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of contentGenerative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of content
 
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
 
Comparative analysis between traditional aquaponics and reconstructed aquapon...
Comparative analysis between traditional aquaponics and reconstructed aquapon...Comparative analysis between traditional aquaponics and reconstructed aquapon...
Comparative analysis between traditional aquaponics and reconstructed aquapon...
 
Manufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptxManufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptx
 

Program to convert 4 digit integer number and display

  • 1. By:KAPIL PANDIT 1 | P a g e /*program to convert 4 digit integer number and display the word equivalent*/
  • 2. By:KAPIL PANDIT 2 | P a g e CODE: #include<stdio.h> main() { int n,i,j,a[5]; char *num[11]={"zero","one","two","three","four","five","six","seven", "eight","nine",}; char*two[10]={"ten","eleven","twelve","thirteen","fourteen","fiveteen" ,"sixteen","seventeen","eighteen","ninteen"}; char *three[10]={"twenty","thirty","fourty","fifty","sixty","seventy", "eighty","ninty"}; int ch; clrscr(); do { fflush(stdin); printf("Enter the 4 digit number:"); scanf("%d",&n); i=0; printf("In Word:"); while(n>0) { a[i]=n%10; i++; n=n/10; } j=i-1; printf("%s thousand ",num[a[j]]);j--; if(a[j]>0) { printf("%s hundred ",num[a[j]]);j--; if(a[j]>0) { if(a[j]>=2) { printf("%s ",three[a[j]-2]);j--; if(a[j]!=0) printf("%s ",num[a[j]]);j--; } else { if(a[j]>1||(a[j]==1&&a[j-1]>=0)) printf("%s ",two[a[j-1]]); else { printf("%s ",num[a[j]]);j--; printf("%s ",num[a[j]]);j--; } }
  • 3. By:KAPIL PANDIT 3 | P a g e } } printf("npress any key to continue..............."); printf("or press 1 to exit:"); fflush(stdin); scanf("%d",&ch); }while(ch!=1); getch(); return 0; }