Answer:
see explaination
Explanation:
#include<iostream>
using namespace std;
#define MAXDAS 100
int main()
{
//int MAXADS = 100;
int adcatcode[MAXDAS];
int adwords[MAXDAS];
int curCode;
int numads;
int i,j,k;
int subtotal;
int temp;
cout<<"Please enter the number of ads: ";
cin>>numads;
if((numads > 0) and (numads <= MAXDAS))
{
for (i = 0;i<numads;i++)
{
cout<<"Please enter Advertisement Category Code (1 - 15): ";
cin>>adcatcode[i];
cout<<"Please enter number of words for the advertisement: ";
cin>>adwords[i];
}
for (i=0;i<numads-1;i++)
{
for (j = 0;j<numads-1;j++)
{
if (adcatcode[j] > adcatcode[j+1])
{
temp = adcatcode[j];
adcatcode[j] = adcatcode[j+1];
adcatcode[j+1] = temp;
temp = adwords[j];
adwords[j] = adwords[j+1];
adwords[j+1] = temp;
}
}
}
cout<<"Total Word Counts Sorted By Category Code"<<endl;
cout<<"========================================="<<endl;
k = 0;
while(k<=numads-1)
{
subtotal = 0;
curCode = adcatcode[k];
while ( (curCode == adcatcode[k])&& (k <= numads - 1) )
{
subtotal = subtotal + adwords[k];
k = k + 1;
}
cout<<"Category: "<<adcatcode[k - 1]<<" "<<"Word Count: "<<subtotal<<endl;
}
}
else
{
cout<<"Number adds requested less than 1 or is too large; ad limit is :"<<MAXDAS;
}
return 0;
}
See attachment for output
Assembly language is the second generation of computer languages is a higher-level language than machine language but is also machine dependent. It uses a series of short codes, or mnemonics, to represent data or instructions.
<h3>What is assembly language?</h3>
Any low-level programming language having a very close resemblance between its instructions and the machine code instructions of the architecture is known as <em>assembly language, assembler language, or symbolic machine code in the field of computer programming.</em> One statement per machine instruction (1:1) is the norm for assembly <em>language, however constants, comments, assembler directives, symbolic labels for things like memory locations, registers, and macros</em> are typically also available.
Learn more about assembly language here brainly.com/question/13171889
#SPJ10
I would say A because the SETI Institute said, "Philip Morrison and Guiseppe Cocconi analyzed how two civilizations separated by many light years of space might use electromagnetic radiation to communicate.
Electromagnetic radiation is the general term for the more familiar light and radio waves."
So there you go!
<u><em>This is for answers not snap</em></u>