Answer:
Is there suppose to be a pic ?
Explanation:
Answer:
Create a dynamic-sized circularly-linked list to hold a tuple of the adverts and the count. As the program runs, the sum of the counts is used to calculate the fixed advertisement time which is saved in a variable time_slot. Then a loop statement should be used to traversal the linked list continuously until the count sum is exhausted for the day.
Explanation:
A circularly-linked list is a linked list with both ends joined together. With this data structure, the continuous traversal of the list is easier and faster. A conditional statement is used in the algorithm to check and decrement the count of each advert and when all is zero or false, the program ends.
Answer:
//get the sentence from the user
Console.WriteLine("Enter your sentence");
//read the user information
string ans = Console.ReadLine();
//check if sentence ends with period
if(!ans.EndsWith("."))
{
Console.WriteLine("Sentence should end with period");
Environment.Exit(0);
}
//declear empty string firstword
string firstWord = "";
//split the requested sentence using single space character
string[] splitans = ans.Split(' ');
//assign firstword
firstWord = splitans[0];
//print out firstword
Console.WriteLine(firstWord);
Explanation:
The program uses c#.
No i cannot bcs i dont know