๐Ÿ”’ Closed Srand and Rand

Status
Not open for further replies.

Soobin_ms

Eternal Poster
Mga ts patulong po dito sa code ko.

May mga errors pa kasi eh. Ito po code ko.

#include <iostream>
#include <cstring>
#include <cstdlib>

using namespace std;

void srand (double seed);

int main()
{

string message ("\n Learn from your mistakes!"),length,len;
cout << message << endl;

getline (cin, length);

len = message.length();
cout << "Length of the string: "<< len << endl;

double a,b = rand();
srand =(12.5)
a= srand (12.5);
b= rand (a);
cout << "\n Random number: " << b << endl;


return 0;
}

Eto po original code na may mga mistakes.
Exercise 2.webp
 
Status
Not open for further replies.

About this Thread

  • 0
    Replies
  • 648
    Views
  • 1
    Participants
Last reply from:
Soobin_ms

Online now

Members online
886
Guests online
718
Total visitors
1,604

Forum statistics

Threads
2,275,563
Posts
28,964,107
Members
1,231,866
Latest member
terrorspeed
Back
Top