Want this question answered?
//the following code will help you to write the program for(i=n-1, j=0; i > 0; i--, j++) //n is the order of the square matrix { for(k=j; k < i; k++) printf("%d ", a[j][k]); for(k=j; k < i; k++) printf("%d ", a[k][i]); for(k=i; k > j; k--) printf("%d ", a[i][k]); for(k=i; k > j; k--) printf("%d ", a[k][j]); } m= (n-1)/2; //calculate the position of the middle element if (n% 2 == 1) printf("%d", a[m][m]);//to print the middle element also //9809752937(udanesh)
17
int main() { int i,j,sum,k; for(i=1;i<=5;i++) { k=1; sum =0; for(j=1;j<=i;j++) { sum = sum+(i*k); k=k*10; } cout<< sum; cout<< "\n"; } }
class Table { int n; void func(int n) { int k=2; for(int i=1;i<n;i++) { System.out.println("table of "+k); for(int j=1;j<=10;j++) { int a=j*k; System.out.print(" "+a); System.out.print(" "); } k=k+1; System.out.print("\n"); } } public static void main(String k[]) { Table t =new Table(); int num=Integer.parseInt(k[0]);//pass the number upto you want the tables eg:4 t.func(num); } }
#include<iostream.h> #include<conio.h> void main() { clrscr(); int i,k,a[10],c[10],n,l; cout<<"Enter the no. of elements\t"; cin>>n; cout<<"\nEnter the sorted elments for optimal merge pattern"; for(i=0;i<n;i++) { cout<<"\t"; cin>>a[i]; } i=0;k=0; c[k]=a[i]+a[i+1]; i=2; while(i<n) { k++; if((c[k-1]+a[i])<=(a[i]+a[i+1])) { c[k]=c[k-1]+a[i]; } else { c[k]=a[i]+a[i+1]; i=i+2; while(i<n) { k++; if((c[k-1]+a[i])<=(c[k-2]+a[i])) { c[k]=c[k-1]+a[i]; } else { c[k]=c[k-2]+a[i]; }i++; } }i++; } k++; c[k]=c[k-1]+c[k-2]; cout<<"\n\nThe optimal sum are as follows......\n\n"; for(k=0;k<n-1;k++) { cout<<c[k]<<"\t"; } l=0; for(k=0;k<n-1;k++) { l=l+c[k]; } cout<<"\n\n The external path length is ......"<<l; getch(); }
whyis the k to 12 program better thatn the current program?
K to 12 means a school that goes from kindergarten to 12the grade. - Ashlee.
k = 2 and 2 < 12
12 / sqrt(2) = 12 sqrt(2) / 2 = 6 sqrt(2)k = 6
i really dont know
It means just what it says. The K to 12 education program can give people what they need to become the nation's future leaders.
Teaching the subject mater.
K-12 is the education format followed in US. K-12 education is provided online by various online schools and homeschooling. An organization called K-12 online/ K-12 Inc provides K-12 education online but is not free, it is a private organization and charges for providing K-12 education.
They can go into all numbers of the form 12*k where k is an integer.
int i=10, j=5, k; k=i*j; // k = 10 * 5 = 50
K=1
n=1 a(1) = 0.001 n=2 a(2) = 0.012 n=3 a(3) = 0.144 n=4 a(4) = 1.728 n=5 a(5) = 20.736 .... n=k a(k) = (12^(k-1))/1000 let n = k+1 a(k+1) = 12^(k)/1000 12(ak) = a(k+1) 12(12^k-1)/1000 = 12^k/1000 the 12 gets absorbed here. 12^(k-1+1)/1000 = 12^k/1000 Valid for k and k+1 therefore our equation A(n) = 12^(n-1)/1000, n(greater than or equal to) 1