Fix ??

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • WELCOME  ###

    #1

    Fix ??

    Can any body fix this code ??

    =============== =============== ==

    #include "stdafx.h"

    #include "cstdlib"

    using namespace System;

    int main(array<Syst em::String ^^args)

    {


    int magic;

    int guess ;

    magic = rand();

    magic=7;

    Console::Write( L" Enter your Guess Number : ");

    guess=Console:: Read();


    if(guess == magic)

    Console::WriteL ine( L"Bravo");


    else

    Console::WriteL ine(L"SORRY");


    return 0;

    }

    +++++++++++++++ +++++++++++++++ +++++++++++++++ +++++++++++++++ +++++++++++++++

    #include "stdafx.h"

    #include "cstdlib"

    using namespace System;

    int main(array<Syst em::String ^^args)

    {

    array<String^>^ names = {"Jim","Ted" , "Bill"};

    array<int>^ weights = { 103,100, 90};

    Array::Sort(nam es, weights);

    for each(String^ name in names)

    Console::Write( L"{0, 10}", names);

    Console::WriteL ine();

    for each(int weight in weights)

    Console::Write( L"{0, 10}", weight);

    Console::WriteL ine();

    return 0;

    }


Working...