Any C Programmer In The House?

Need help plz....have to submit it by tom :ashamed:
Write a program to create matrix of maximum 10 x 10 and detect any row or column of all 0's and remove from the matrix.Print the output.
Write a program to accept principle amount, rate of interest and tenure. Divide the principle amount by total tenure. Then calculate the interest amount on monthly reducing basis. Then add the principle amount and interest amount to calculate the total EMI monthly.
 
actually both are very simple......why don't you try them yourself first and then ask for any corrections that might be needed.

this is the only way you'll learn. sorry but would have helped you otherwise
 
Hacker said:
lol, I think you will get the code on planetsourcecode.com

Thnks buddy

Gurpartap Singh said:
lol maddy, what a fake reply.

Jus dnt post if u cant help...stay outta this thread

eggman said:
loooooooooool:eek:hyeah::eek:hyeah::eek:hyeah::eek:hyeah::no:

Same goes for u eggy

Sanjeet Arora said:
@ maddy : "Let us C" by Yashwant kanetkar

this is wht u need. read and make programs

K wil refer :)

-----------------------------------------------------------------------------------------

I tried this for the 1st one n got it wrong

int x[10][10];

int n=0;

for(i=0;i<10;i++)

{

for(j=0;j<10;j++)

{

if(x[j]!=0)

n=1;

}

if(n==0)

for(j=0;j<10;j++)

x[j]=' ';

}

printf("MATRIX");

for(i=0;i<10;i++)

{

for(j=0;j<10;j++)

printf("%d",n[j]);

}
The above program is of matrix 10 x 10.I want somthing like n x m
 
you are not taking any inputs for that program which can solve the n x m part of the matrix.

also, the mistake is that you are not resetting n=0 after the for(j...) loop

try it like this

for(i...)

{

n=0;

for(j...)

{

.......

}

}

another mistake I can see is that this will work only if all entries in a column are 0.

for checking for entries in a row just run the above 2 loops again in reverse order (i.e the 'i' loop after the 'j' loop).

-edit-

forgot to add.

if you take some effort to at least try and give us some working code, we will point out the mistakes.

in no way was I even going to reply to this thread after reading the first post.

you can find ready-made code on many other sites but I hope someone here in TE doesn't spoon feed you.
 
keep a printout of this with you always...
ididntdohomework.jpg
 
Back
Top