Solutions:
class coderguruji
{
public static void main(String args[])
{
double d=0.0;
Scanner sc=new Scanner(System.in);
System.out.println("enter m*n");
int p=0,q=0,x=0,s=0,y=1;
int m=sc.nextInt();
int n=sc.nextInt();
if((m<0||m>10)&&(n<2||n>6))
{
System.out.println("OUT OF RANGE");
}
else
{
int a[][]=new int[m][n];
int b[]=new int[1000];
int c[]=new int[1000];
for(int i=0;i<m;i++)
{
for(int j=0;j<n;j++)
{
a[i][j]=sc.nextInt();
}
}
for(int i=0;i<m;i++)
{
for(int j=0;j<n;j++)
{
b[p]=a[i][j];
p++;
}
}
for(int i=0;i<m;i++)
{
for(int j=0;j<n;j++)
{
d=a[i][j]*Math.pow(8,n-y);
s=(int)d;
x=x+s;
y++;
}
c[q]=x;
q++;
y=1;
x=0;
}
System.out.println("FILLED MATRIX"+"\t\t"+"DECIMAL EQU");
for(int i=0;i<m;i++)
{
for(int j=0;j<n;j++)
{
System.out.print(a[i][j]+" ");
}
System.out.println();
}
for(int j=0;j<q;j++)
{
System.out.print("\t\t\t"+c[j]);
System.out.println();
}
}
}
}
---------------------------end-------------------------------
Sir, I need Question 3 solution. When will uou post it ??
ReplyDeletevery soon!!
DeleteAnd kindly share it with your friends.
Thank you sir 😇
ReplyDeleteNice behavior and original items no cheating
ReplyDelete"Ziyyara’s ISC tutor offers one-to-one online home tuition for ISC Board students.They implement pedagogy teaching methods while delivering online tuition classes."
ReplyDeleteVisit On:- isc online tuition
Phone no - +91-9654271931
Thanks For sharing this wonderful blog.
ReplyDeleteZiyyara is a platform which provides isc class 12 online classes. And tuition for ISC classes or call +91-9654271931 for more information.
Are you looking for ISC Online Tuition Classes for your children so that they can get ahead in their studies? Ziyyara is an online learning platform that provides one-on-one Online Tuition For ISC Board for all grade students worldwide.
ReplyDeleteContact Us: India - +91-9654279131 | UAE - +971-585346679 | Oman - +968 71912179