Question:
When moving, ants form rows so that each ant except the first is behind another ant. It is not widely known what happens when two rows of ants moving in opposite directions run into each other in a passage too narrow for both rows to...
Posted at 15:46h
in
Uncategorized
by admin
Question:
Write a program to print out a calendar for a particular month given the day on which the first of the month occurs together with the number of days in the month.
Your program should take as input an integer representing the day of the week...
Question:
A company's network is composed of N computers. System administrators gathered information on the traffic between nodes, and carefully divided the network into two subnetworks in order to minimize traffic between parts.
Jack hacked into the company's network and decided to reassign computers to maximize the...
Question:
Create a loop between 1 to 20.
Print “fizz” if the number is divisible by 3
Print “bizz” if the number is divisible by 5
Print “fizzbizz” if a number is divisible by both 3 and 5.
Otherwise, print the number itself.
Hint: You should use...
Question:
Write a program to print out a calendar for a particular month given the day on which the first of the month occurs together with the number of days in the month.
Your program should take as input an integer representing the day of the week...
Question:
write a program to ask user about the date(year, month and day), then pass these year month and day as arguments to a function calcDay that return the day of the year.
Sample input:
Year: 2016
Month: 6
Day: 23
Sample output:
Day of the year: 175
Hint:
You need consider leap years and...