Prolog program for weather

  % problem 5 – Implement get_weather, which first prints a message: % ‘Enter hot, sun, rain, snow or stop.’ Then it starts a loop, % in which it prints the prompt and reads the user’s input. % If the user enters stop the loop ends. Else, if the % user entered one of the […]

Read More

Operating system questions and solutions 2

1. Write a program named <print_num.c>, which should take one command-line argument called maxnum. Print_num should fork a child process, which prints the odd integers up to maxnum (inclusive), with space separating the numbers. At the same time, the parent process should print the even integers from 0 to maxnum (inclusive), with space separating the […]

Read More

Sorting Methods- Algorithms

I’m going to discuss some sorting methods used in computing in this post. By the way, sorting is a way of arranging objects in a list or an array or a sequence of numbers. This is a typical computer science knowledge so don’t get confused if you don’t know what l’m talking about. For a […]

Read More