char one, two, three; char four, five, six; int i = 0; char inan[30]; char outan[30]; char ch = ' '; srand(time(NULL)); cout << "Please enter a file name to anaylise" << endl; cin.getline(inan, 30); ifstream infile(inan); if(infile.fail()) cout << "Opening of " << inan << " Failed" << endl; while(ch != '.') {
outan[i] = 'h'; i++; outan[i] = 't'; i++; outan[i] = 'm'; i++ ; outan[i] = '\0'; //cout << "opening " << outan << endl; ofstream outfile(outan); if(outfile.fail()) {
// setup html file outfile << "<html> \n"; outfile << "<head> \n"; outfile << "<title>Scope Analysis of " << inan << "</title>" << endl; outfile << "</head> \n <body>" << endl; while(!infile.eof()) {
// finish off html file outfile << "<hr>" << endl; outfile << "Scope Analysis of " << inan << " produced by jambe <FONT color=#cc0000>Sco</FONT><FONT color=#00cc00>pe<FONT color=#0033ff>Ana</FONT>ly</FONT><FONT color=#cc0000>zer </FONT>" << endl; outfile << "<a href = \"http://www.jambe.cjb.net\">www.jambe.cjb.net</a>" << endl; outfile << "\n </body>" << endl; outfile << "</html>"; cout << "Scope analysed" << endl; cout << "Please view " << outan << " To see the results " << endl; cin >> i; return 0; |
int rn; rn = rand(); //cout << " Actual random number: " << rn; rn = (rn * 1063001) % 16; // cout << "Random number is " << rn << endl; if(rn < 0) rn = -rn; return (hex(rn)); |
char rn; if(num == 0) rn = '0'; else if (num == 1) rn = '1'; else if (num == 2) rn = '2'; else if (num == 3) rn = '3'; else if (num == 4) rn = '4'; else if (num == 5) rn = '5'; else if (num == 6) rn = '6'; else if (num == 7) rn = '7'; else if (num == 8) rn = '8'; else if (num == 9) rn = '9'; else if (num == 10) {
else if (num == 11) {
else if (num == 12) {
else if (num == 13) {
else if (num == 14) {
else if (num == 15) {
else {
return rn; |