Jump to content

JamesWonderCuck

Member
  • Posts

    5
  • Joined

  • Last visited

Awards

This user doesn't have any awards

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. First post here. A little program I made, that converts a number written in decimals in words. Hope someone considers this useful. #include <iostream> #include <string> #include <vector> using namespace std; string digit[1000] = {"zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten", "eleven", "twelve", "thirteen", "fouteen", "fifteen", "sixteen", "seventeen", "eighteen", "nineteen", "twenty"}, expo [] = {"", "thousand,", "million,", "billion", "trillion,", "quadrillion,"}; vector <string> engNum; int st, niv; void Set (int st, int niv) { if (!st) return; engNum.push_back (" " + expo[niv]); if (st % 100 <= 20 ) { engNum.push_back (" " + digit[st % 100]); } else { if (st % 10 != 0) engNum.push_back (" " + digit[st % 10]); if ((st / 10) % 10 != 0) engNum.push_back (" " + digit[st % 100 - st % 10]); } if (st / 100 != 0) engNum.push_back (" " + digit[st / 100] + " " + digit[100] + " and"); } int main() { string x; digit[30] = "thirty"; digit[40] = "fourty"; digit[50] = "fifty"; digit[60] = "sixty"; digit[70] = "seventy"; digit[80] = "eighty"; digit[90] = "ninety", digit[100] = "hundred"; for (;;) { cin >> x; if (x == "0") cout << " zero\n"; else { for (int i = x.size () - 1, niv = 0; i >= 0; i = i - 3) { if (i >= 2) { st = (x.at (i) - 48) + (x.at (i - 1) - 48) * 10 + (x.at (i - 2) - 48) * 100; Set (st, niv); niv++; } else { if (i == 1) { st = (x.at (i) - 48) + (x.at (i - 1) - 48) * 10; Set (st, niv); } else { st = (x.at (i) - 48); Set (st, niv); } } } for (int i = engNum.size () - 1; i >= 0; i--) { if (i == 0) { x = engNum [0]; if (x.at (x.size () - 1) == ',') x.at (x.size () - 1) = ' '; cout << x; break; } cout << engNum; } cout << "\n"; engNum.clear(); } } return 0; }
  2. I have not owned, nor used Steelsereis 9H headphones, but I can recommand the HyperX Cloud II as the best bang for the buck for me (not audiophile, spends about 4h a day using a computer, usually chats with friends on skype and plays games). The 7.1 functionality is also pretty good, if you need it, and they runs off of USB.
  3. One more question, is second hand ram a bad ideea?
  4. Thanks for the replies. I have a I5 4440, which doesn't support quad chanel. Should I sell my set and buy 2 x 8gb sticks? Note that I have no plan to upgrade further than 16gb.
  5. Hi guys, I've been wanting to upgrade my ram from 8 to 16 gb for a while, but I have a little problem. I am using a kit of dual chanel hyperx furry ddr3 1600mhz cl10 sticks and I want to get a set that is exactly the same. Will this config work? I' ve heard people say that you need all four sticks to come in the same box if you want to use a quad chanel setup. All replys are wellcome.
×