Answer to Question #245146 in C++ for hummi

Question #245146

Your root document should consist of a random number of lines of the nursery rhyme"Hickory Dickory Dock", the official lyrics are listed below. You should serve the document as plain text(to keep things simple).You reply must include a correct Content-Type header of text/plain and a content-Length header that reflects the size of the data that you are sending.When generating random numbers the rand(>and srand(>methods are sufficient, but be careful where you seed the random number generator.


You may use the last 4 digits of your student number as the port to listen on, as you may not be able to bind to port 80



1
Expert's answer
2021-10-03T17:55:20-0400
#include<time.h>

#include <stdlib.h>
#include <stdio.h>
 

int main)
{
    
    srand(time(0));
 
    for(int x = 0; x<4; x++)
        printf(" %d ", rand());
 
    return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS