Our Feeds

Friday 7 September 2012

AJITH KP

Logic Guideline

Programming depends on your logic. For Example,
Teacher asked students to create a problem which gives answer 100.

Student A : 50+50=100
Student B : 150-50=100
Student C : 10x10=100
Student D : 1000/10=100

Look the logic of Students.

Like that you want need a logic mint to solve the problems.

One more Logic based example for print 1 to 100. So you need a wise mint to simplify the problem.
It is not applicable to use,
printf("1\n");
printf("2\n");
.
.
.
printf("100");

So your wise mint should simplify this. You mint must find use of "Loops" in this situation.
Lets look how to solve this using "Loops".

While Loop


For Loop


This is also depends on your Logic.