Answer to Question #281490 in C for HARRV

Question #281490

1. Write a program to enter 10 floating numbers in an array and display it.

2. Write a program to display largest and smallest element of an array defined in Q.No. 1.

3. Write a program to initialize one dimensional array of size 8 and display the sum and average of array elements

4. Write a program to read two matrices of order 3 * 2, add them and display the resultant matrix in matrix form.

5. Write a program to multiply two 3*3 matrix. 6. Write a program to read a string and check for palindrome without using string related function (a string is palindrome if its half is mirror by itself eg: abcdcba).


1
Expert's answer
2021-12-20T09:57:04-0500
#include<bits/stdc++.h>
using namespace std;


int main()
{
    int n;
    cout<<"Enter the number of elements in Array: ";
    cin>>n;
    
    
    float a[n];
    
    for (int i = 0; i<n; i++)
    {
        
        cout<<"Enter "<<i+1<<" element: ";
        cin>>a[i];
    }
    
    for (int i = 0; i<n; i++)
    {
        
        cout<<i+1<<" Element: ";
        cout<<a[i]<<endl;
    }
    
   
    
    
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS