I'm a student that needs extra emergency help please!! Please help my assignment is already late. I'm trying to get these 2 codes to work but i can't. I have no more ideas, can someone please please help me. I'm using Microsoft Visual C++ to for my codes. Here they are
1--This one should change numbers to text like 32 = thirty two
#include "stdafx.h"
using namespace System;
int main (array<System::String ^> ^args)
{
Random ^ generator = gcnew Random;
int number = generator->Next (0,Int 32::MaxValue-10000) + 100000;
Console:: WriteLine (L "The value is {0}", number);
array<string^>^ digitWord = {L" zero", L" one", L" two", L" three", L" four",
L" five", L" six", L" seven", L" eight", L" nine"};
String^ inWords = L"";
while(number > 0)
{
inWords = digitWord[number % 10]+inWords;
number /= 10;
}
Console::WriteLine(inWords);
return 0;
}
.......................................................................................................
2--This should capitalize every other letter
#include <iostream>
#include <string>
using std::cout;
using std::endl;
int main()
{
char str[] = "What was yor name?";
cout << str << endl; // Output the string
for (unsigned int i = 0; i < strlen(str); i += 2)
{
if (str[i] >= 'a' && str[i] <= 'z') // If lowercase letter
str[i] -= 32; // change to uppercase
}
cout << str << endl; // Output the modified string
return 0;
}