>i have a problem in programming
Pretty much every thread in this forum is based on a 'problem in programming', try to be more descriptive next time you make a new thread.
>how can i know the right logical solutions for the problem after reading it ??
That didn't make much sense to me. Is there a specific problem you're having, or is it just a really vague question? If there's an actual problem, post code and give more information.
To the OP:
As it has been said: Programming is an Art.
Some have god gifted talent in programming. Others develop their talent by practicing more problems.
It is simply not possible for us to solve this problem (of having non-logic mind in programming.)
Learn how to program is exercising, the more you exercise the better you'll be, but there aren't any tricks/rules to learn how to logically solve a problem (except abstraction, where you break a problem down to several easy to understand parts) ...
It is not a problem to write a code without errors , but the point is that either your goal for writing program is accomplished or not , for this thoroughly read the problem agian an gain until ou understand what u are supposed to do, then write its algorithm on paper , after that u are ready to code. Direct coding is not a good practice.
Logic is real understanding of what you are trying to accomplish , and the structure of arguments.
Analyze a problem, express its essence abstractly, sort through information, make connections, recognize patterns...
Your ambitions should comfort you in problem solving.
Write a C program that should create a 10 element array of random integers (0 to 9). The program should total all of the numbers in the odd positions of the array and compare them with the total of the numbers in the even positions of the array and indicate ...
I have a 2d matrix with dimension (3, n) called A, I want to calculate the normalization and cross product of two arrays (b,z) (see the code please) for each column (for the first column, then the second one and so on).
the function that I created to find the ...