cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
General C++ Programming
finding output
finding output
Mar 9, 2012 at 8:13am UTC
wildcat
(10)
#include<iostream.h>
#include<stdlib.h>
void main()
{
randomize();
char city[][10]={ "DEL","CHN","KOL","BOM","BNG"};
int fly;
{
fly=random(2)+1;
cout<<city[fly]<<" ";
}
}
OUTPUTS:
1) DEL:CHN:KOL:
2) CHN:KOL:CHN:
3) KOL:BOM:BNG:
4) KOL:CHN:KOL:
Mar 9, 2012 at 10:27pm UTC
therockon7throw
(284)
:-)
Topic archived. No new replies allowed.