1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
larisa [96]
3 years ago
14

Create a 4x5 matrix with ones everywhere and zeros on the last row.

Computers and Technology
1 answer:
Stells [14]3 years ago
7 0

Answer:

#include <iostream>

using namespace std;

int main() {

   int a[4][5];//declaring a matrix of 4 rows and 5 columns.

   for(int i=0;i<4;i++)

   {

       for(int j=0;j<5;j++)

       {

           if(i==3)//initializing last row as 0.

           {

               a[i][j]=0;

           }

           else//initializing last row as 1.

           {

               a[i][j]=1;

           }

       }

   }

   for(int i=0;i<4;i++)

   {

       for(int j=0;j<5;j++)

       cout<<a[i][j]<<" ";//printing the matrix.

       cout<<endl;

   }

return 0;

}

Output:-

1 1 1 1 1  

1 1 1 1 1  

1 1 1 1 1  

0 0 0 0 0

Explanation:

I have created a matrix of size 4 rows and 5 columns.I have used for loops to fill the array.To fill the last row with 0 i have used if statement.else we are filling it with 1.

You might be interested in
A _____ is a form of Web conferencing that uses streaming media technologies to broadcast video and/or audio over the Internet f
ra1l [238]

Answer:

Webcast

Explanation:

Webcast is the live broadcast of a video or audio feed from your event or conference harnessing the internet. Webcast is a media presentation of an event circulated over the internet by using media technology to distribute a single source to various viewers.

Generally,  webcast is briefly defined as broadcasting over the internet. The broadcast might not be specifically live  . One can capture the video or the audio he or she wants to publish and publish it online anywhere. Webcast allow your viewers to remain engage as if they are face to face with the broadcaster.

Webcasting is a a great tools that has been used by various multinational and company to reach wide range of audience . This web based broadcast can even provide opportunity for audience to ask question and even provide answers in real time.

4 0
3 years ago
Read 2 more answers
Write a program that takes three numbers as input from the user, and prints the largest.
balandron [24]

Answer:

I'll be using python:

__________________________

a=int(input("Enter a number :"))

b=int(input("Enter another number :"))

c=int(input("Enter last number :"))

lis=[a,b,c]

sort=sorted(lis)

print("The largest number is:", sort[1])

___________________________

8 0
3 years ago
Ask the user to enter a number. Display whether the number is odd or even. computer science answers
notsponge [240]

Answer:

Write a C program to check whether a number is even or odd using if else. How to check whether a number is even or odd using if else in C program. C Program to input a number from user and check whether the given number is even or odd. Logic to check even and odd number using if...else in C programming.

Explanation:

6 0
2 years ago
Read 2 more answers
Helo me pleace! Cartoons Disney answer! How many Dalmatian puppies are in Pongo and Perdita’s litter?
Sindrei [870]
15 puppies :) I hope this helps!
5 0
3 years ago
Kim's father's company has expanded many times. Therefore, the company's volume of data has also increased. The employees of tha
Flura [38]

B. LAN


She should choose the LAN because , its secured and wired. On LAN the huge amount of data can be transferred better than WLAN so the best option would be place LAN network for the employees to access the huge amount of data.

4 0
3 years ago
Read 2 more answers
Other questions:
  • What operating system was most commonly used by early personal computers? Apple Mac MS-DOS Windows
    6·2 answers
  • Stores of data that are so large or complex that it is difficult to process them using traditional data base management applicat
    5·1 answer
  • If your BAL is .10 you can expect a _______ drop in complex performance compared to the sober level
    6·1 answer
  • A developer working on a time management application wants to make total hours for each timecard available to application users.
    8·1 answer
  • Well this isn't school related, but how do i watch dubbed and subbed anime for free on my computer?
    7·2 answers
  • If a code word is defined to be a sequence of different letters chosen from the 10 letters A, B, C, D, E, F, G, H, I, and J, wha
    15·1 answer
  • True / False
    6·1 answer
  • What are source data entry devices​
    13·1 answer
  • Write a program that reads in exam scores and displays the average score and the high score.
    9·1 answer
  • What power points feature will you use to apply motion effects to different objects of a slide
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!