![]() | |
| |||||||
| Home | Register | Blogs | FAQ | Members List | Calendar | Downloads | Arcade | Mark Forums Read |
| Languages, Compilers and Interpreters C,C++,C#,.NET,Java,PHP,Perl,SQL and more |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| | #16 | |
| Silence Join Date: Nov 2004 Location: back to meta level
Posts: 3,924
Blog Entries: 3 Rep Power: 5 Reputation:
189 | Re: vaild account Quote:
p.s. oy do chego j bivayu vrednoy ![]() | |
| | |
| | #17 |
| Дошкольник Join Date: Apr 2003 Location: USA
Posts: 103
Rep Power: 6 Reputation:
10 | Re: vaild account that should work and stop after valid number was found. You can change condition to search entire array by removing boolean flag, . Its a simple program and should be able to do it yourself . Code: #include <iostream>
using namespace std;
void searchlist (double [],int,double);
const int index = 18;
int main()
{
double num;
double Account[index]=
{5658845, 4520125, 7895122, 8777541, 8451277, 1302850,
8080152, 4562555, 5552012, 5050552, 7825877, 1250255,
1005231, 6545231, 3852085, 7576651, 7881200, 4581002 };
cout << "enter Number\n";
cin >> num;
searchlist(Account,index,num);
system("pause");
return 0;
}
void searchlist(double list [index],int index,double value)
{
bool found=false;
int i=0;
while (i<=index && !found)
{
if (list [i] == value)
{
cout<<"Valid"<<endl;
found=true;
}
else
cout<<"Invalid"<<endl;
i++;
}
}
__________________ No se preocupe, sea feliz ! |
| | |
| | #18 |
| Младенец Join Date: Mar 2006 Location: san fan
Posts: 15
Rep Power: 0 Reputation:
10 | Re: vaild account im a girl and no its not for a job its just homework in a class i am taking a majority of the programs i write on my own but i tend to get stuck on some things. so i ask for help in on here much easier then getting a hold of my professor. i got the account validation to work good but thanks for the help Diane, this is the first time i have even tried programing i just learned how to use the internet :-( sad huh. |
| | |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Offering gmail account invitation for free! | acid | English Only | 173 | Apr 21, 2006 09:04 |
| Could Anybody Help to Create New Gmail Account | nissankale | General | 32 | Apr 5, 2005 09:11 |
| New Free email account with 3GB! | Red Stone | Web sites | 5 | Oct 30, 2004 20:41 |
| Gmail Drive - Change your mail account into a 1GB hard drive | Red Stone | Software | 1 | Oct 8, 2004 18:52 |
| How to open Paypal account | acid | General | 4 | Sep 3, 2004 05:08 |