Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14

Thread: И так

  1. #11
    Кассандр peterburger's Avatar
    Join Date
    Dec 2006
    Location
    LA
    Posts
    34,972

    Default Re: И так

    Свинг по-форумски? типа падрачить на Памелу?
    "... Настоящая женщина - это та, которая не прошлая и не будущая..."фтык:мой музон мысли fotki
    © Copyright Peterburger 1998-2018, All rights and lefts are reserved.

  2. #12
    Forum Hero
    Join Date
    Dec 2007
    Location
    Marina del Rey, CA
    Posts
    55,247

    Default Re: И так

    Quote Originally Posted by Malishka
    заметно что сегодня что то в воздухе, может люди чувствуют приближение весны, но форум как то заволновлся, всколыхался, люди начинают соритьса.

    Предлагаю тут собратьса на свингеровское парти. Мейк лав нот вор. Кто за? Пожалуйста, предлагайте свои кандидатуры и что вы предпочитаете. :34:
    Одиноких мужчин на свинг парти не пускают. Кто из дам со мной за компанию?

  3. #13

    Default Re: И так

    Ладно, Малышка, ты не захотела разобраться. Я уже нашел ошибку. Только почему-то функция rand мне выдает постоянно случайные числа... но почему-то одни и те же:( Я уже занимаюсь любовью с этим 2 часа


    //program guesses a number from 1 to 100


    //program guesses a number from 1 to 100

    #include<iostream>

    using std::cout;
    using std::cin;
    char isTooLow;


    #include <cstdlib>
    using std::rand;
    using std::srand;

    int Player(int, int);



    int main()
    {
    int RandomNumbers[11];//0-9 locations of array will represent 10 random numbers.
    //The number on 10th place will be the number of current try.

    double average=0;
    int i;

    for (i=0;i<10;i++)
    {
    //cout << " "<< RandomNumbers[i] << " "<<i;
    RandomNumbers[i] = rand() % 100 + 1;
    //cout << " "<< RandomNumbers[i] << " "<<i;
    //get 10 random numbers into the array
    average = average + Player(RandomNumbers[i], i+1);//This function sums number of average tries by user


    }
    cout<<"The average number of tries is " << average/10.0;
    cin>> average;
    return 0;


    }





    int Player(int GetNumber, int i)
    {

    int guess;
    int count=0;//number of times it took user to guess
    //Display introduction

    cout<< "Hello user! This is the time "<<i<< " you are guessing the number\n";

    do
    {
    // Guessing rutine

    count++;
    cout << "What do you think the number is?\n";
    cin >> guess;
    if (guess == GetNumber)
    {
    cout << "you got it in "<<count<<" tries\n";

    //if we too low, then we have to add 1 to the guess, else subtract 1.
    }
    else if(guess > GetNumber)
    {
    cout << "You are too high\n";
    }
    else
    {
    cout << "You are too low\n";
    }

    }
    while (guess != GetNumber);




    return count;
    }
    "In other words, stupid people are too stupid to know how stupid they are. "--если вам кажется что вы умны, то почитайте эту статью: http://blog.sfgate.com/nov05election...-thrive/?tsp=1--если же вам кажется что все вокруг идиоты, то так оно и есть.

  4. #14
    Banned Forever Бегемот's Avatar
    Join Date
    Jan 2004
    Location
    Изумрудный город
    Posts
    71,493

    Default Re: И так

    Quote Originally Posted by peterburger
    Свинг по-форумски? типа падрачить на Памелу?
    на аву :angel:

Page 2 of 2 FirstFirst 12

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Russian America Top. Рейтинг ресурсов Русской Америки. Terms of Service | Privacy Policy Рейтинг@Mail.ru