Random Word Genration

  • November 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Random Word Genration as PDF for free.

More details

  • Words: 52
  • Pages: 1
#include #include <string> #include using namespace std; void RndWord(long iLen){ char ch; string mystr; char i=0; while (i < iLen){ ch = (rand()%(('Z'-'A'))+'A'); mystr += ch; i++; } cout << mystr << "\n"; } int main(void){ long lenword; srand(time(NULL)); cout << "Word length?\n"; cin >> lenword; RndWord(lenword); return 0;

}

Related Documents

Random Word Genration
November 2019 5
Random
December 2019 55
Random Poetry
May 2020 12
Random Quotes
November 2019 21
Random Variable
October 2019 38