3.4 The two dimensional (2-D) array in Figure 3 is initialized with predetemined values of positive and negative numbers. Type and compile the program. 1 Hinclude 2 3 int main () int listnum[5]...


C programming


3.4 The two dimensional (2-D) array in Figure 3 is initialized with predetemined values<br>of positive and negative numbers. Type and compile the program.<br>1 Hinclude<stdio.h><br>2<br>3 int main ()<br>int listnum[5] [2]=(2,-3,7,9,-5,0,-8,1,-4,10};<br>int i,j,neg=0, pos=0;<br>6<br>7<br>for (i=0;i<5;i++)<br>9<br>for (j=0:j<1;j++)<br>10<br>11<br>12<br>if (listnum [i][j]<0)<br>13<br>neg++:<br>14<br>else<br>15<br>pos++:<br>16<br>17<br>printf (

Extracted text: 3.4 The two dimensional (2-D) array in Figure 3 is initialized with predetemined values of positive and negative numbers. Type and compile the program. 1 Hinclude 2 3 int main () int listnum[5] [2]=(2,-3,7,9,-5,0,-8,1,-4,10}; int i,j,neg=0, pos=0; 6 7 for (i=0;i<5;i++) 9="" for="" (j=""><1;j++) 10="" 11="" 12="" if="" (listnum=""><0) 13="" neg++:="" 14="" else="" 15="" pos++:="" 16="" 17="" printf="" ("total="" positive="td," total="" negative="td\n"," pos,="" neg)="" ;="" 18="" 19="" return="" 0;="" 20="" }="" figure="" 3="" (a)="" predict="" the="" output="" of="" the="" program.="" (b)="" amend="" the="" program="" so="" that="" the="" process="" between="" line="" 12="" to="" 15="" is="" performed="" against="" all="" elements="" in="" listnum.="" the="" output="" should="" be="" as="" follows:="" total="" positive-6,="" total="">

Jun 10, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here