===========================================================================
CODING
#include<all.h>
void main()
{
int n=0,SUM=0,sum=0,i=1,q=0,N=0;
label:
clrscr();
cout<<"\nEnter number: ";
cin>>n;
if(n<2)
{
cout<<"\nWrong Input! TRY Again\nPlease wait while Reloading......";
delay(2000);
goto label;
}
else;
cout<<"\n\n\n";
do
{
if(i==2)
q=N;
cout<<"\n Enter number \""<<i<<"\": ";
cin>>N;
if(q>N)
q=N;
else if(q<=N)
q=q;
i++;
}while(i<=n);
cout<<"\n\n¯Smallest number is "<<q;
getch();
}
CODING
#include<all.h>
void main()
{
int n=0,SUM=0,sum=0,i=1,q=0,N=0;
label:
clrscr();
cout<<"\nEnter number: ";
cin>>n;
if(n<2)
{
cout<<"\nWrong Input! TRY Again\nPlease wait while Reloading......";
delay(2000);
goto label;
}
else;
cout<<"\n\n\n";
do
{
if(i==2)
q=N;
cout<<"\n Enter number \""<<i<<"\": ";
cin>>N;
if(q>N)
q=N;
else if(q<=N)
q=q;
i++;
}while(i<=n);
cout<<"\n\n¯Smallest number is "<<q;
getch();
}
===========================================================================
No comments:
Post a Comment