1. spreadsheet
2. Computers will continue to become smaller in size and become faster
Answer:
#include <iostream>
using namespace std;
int main()
{
int cookies;
cin >> cookies;
cout << "The calorie consumption is: " << cookies * 142 << endl;
return 0;
}
Explanation:
First line: include basic library of C++(input and output).
using namespace std;
Says to compiler we are using std.
int main() Main function
int cookies, cookies variable, of int type
cin >> cookies
get the number of the cookies from user
cout Print the text and calories(one cookie have 142 calories)
Have a nice day ;)
Answer:
#include <stdio.h>
#include <ctype.h>
void printHistogram(int counters[]) {
int largest = 0;
int row,i;
for (i = 0; i < 26; i++) {
if (counters[i] > largest) {
largest = counters[i];
}
}
for (row = largest; row > 0; row--) {
for (i = 0; i < 26; i++) {
if (counters[i] >= row) {
putchar(254);
}
else {
putchar(32);
}
putchar(32);
}
putchar('\n');
}
for (i = 0; i < 26; i++) {
putchar('a' + i);
putchar(32);
}
}
int main() {
int counters[26] = { 0 };
int i;
char c;
FILE* f;
fopen_s(&f, "story.txt", "r");
while (!feof(f)) {
c = tolower(fgetc(f));
if (c >= 'a' && c <= 'z') {
counters[c-'a']++;
}
}
for (i = 0; i < 26; i++) {
printf("%c was used %d times.\n", 'a'+i, counters[i]);
}
printf("\nHere is a histogram:\n");
printHistogram(counters);
}
I think it is B because the + sign is saying that there is more than just guitars
Hope this is helpful :D