Do you have questions ? We got the answers!

Ask a question:

0
Problem : Compiler Design - Limit the methods?

Open 0 Answers 38 Views Programming
Rahul is a newbie to the programming and while learning the programming language he came to know the following rules:

·         Each program must start with '{' and end with '}'.

·         Each program must contain only one main function. Main function must start with '<' and end with '>'.

·         A program may or may not contain user defined function(s). There is no limitation on the number of user defined functions in the program. User defined function must start with '(' and end with ')'.

·         Loops are allowed only inside the functions (this function can be either main function or user defined function(s)). Every loop must start with '{' and end with '}'.

·         User defined function(s) are not allowed to be defined inside main function or other user defined function(s).

·         Nested loops are allowed.

·         Instructions can be any where inside the program.

·         Number of user defined functions inside a program must not be more than 100.

If any of the above conditions does not met, then the program will generate compilation errors. Today Rahul has written his first program "Hello World", but he is not sure about the correctness of the program now your task is to help him to find out whether his program will compile without any errors or not.

Input Format:


Please log in or register to answer this question.

...