Question: Write a C program in question 1)There are 20 robots that are placed in a 100x100 rectangular area. At each jump a robot can go

Write a C program in question

1)There are 20 robots that are placed in a 100x100 rectangular area. At each jump a robot can go one step either horizontally or vertically. There is a meeting point in the area that all robots are supposed to go as fast as possible. Write a function that takes the coordinates of the robots as 20x2 integer array and the coordinate of the meeting point as an integer array of length 2. ( The 1st element of a coordinate represents row the 2nd element represents column). The function must return the total required number jumps for all robots to meet at the meeting point.

2)Write a function that takes a string str as parameter. The function must return the length of the longest block (consecutive characters) that str starts with and that contains equal number of small and capital letters. Example: If the string: heLLo WorlD. then the longest block is :heLLo W so it should return 7.

Note: ASCII code of A : 65 and ASCII code of a: 97

3)Assume that following constants and types are already defined:

#define TERMCOUNT 5 typedef int Term[2]; // A term of the polynom.

// term[0]: Coefficient

// term[1]:Degree

// Ex: {1,2} -> x^2

typedef Term Polynom[TERMCOUNT]; // A polynom that contains 5 terms

// for example: x^6+ x^4+ x^3 + 2x - 5

Write a function that takes a term t and a polynom p as a parameter. The function should multiply p with the term t and write the result into p.

Example: p: x^3 + 2x + 5 and t: 2x then p becomes: 2x^4 + 4x^2 + 10x

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!