So I have a square matrix with n lines and I have to erase all the lines that begin with a number dividable by 10.Please help.Can you please write the program in C++ language and explain a bit ?Thank you so much!
Please help! c++ problem?
hey, use if condition in n times loop and erase those which are divisible by 10
thats all
Thanks
Reply:#INCLUDE%26lt;IOSTREAM.H%26gt;
VOID MAIN()
{
INT A[I,j];int n;
cout%26lt;%26lt;"Enter a number"%26lt;%26lt;endl;
FOR(INT I=0;I%26lt;N;I++)
{
for(int j=0;j%26lt;n;j++){
cin%26gt;%26gt;a[i,j];
}
}
for(i=0;i%26lt;n;i++)
{
if(a[i,0]%10==0)
{
for(i=0;i%26lt;a[i,j];i++)
{
for(j=0;j%26lt;a[i,j];j++)
{
a[i,j]='\0';
}
}
well the rest is upto you good like and I hope its right im I just finished first year.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment