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
QveST [7]
3 years ago
7

In c please

Computers and Technology
1 answer:
Paraphin [41]3 years ago
5 0

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);

}

You might be interested in
Which button is not present in the font group Home tab?<br> -B<br> -U<br> -I<br> -D
Otrada [13]

Answer:

-i

Explanation:

is the answer of that question

3 0
3 years ago
Read 2 more answers
Write a method max() which take a generic singly linked list as an argument and returns the maximum element reference in the lis
max2010maxim [7]

Answer:

See explaination

Explanation:

java code:

class DONALD

{

static class Node

{

int data;

Node next;

}

static Node head=null;

static int largestElement(Node head)

{

Int max=Integer.MIN_VALUE;

while(head!=null)

{

if(max<head.data)

max=head.data;

head=head.next;

}

return max;

}

static int smallestElement(Node head)

{

int min=Integer.MAX_VALUE;

while(head!=null)

{

if(min>head.data)

min=head.data;

head=head.next;

}

return min;

}

static void push(int data)

{

Node newNode=new Node();

newNode.data= data;

newNode.next=(head);

(head)=newNode;

}

static void printList(Node head)

{

while(head!=null)

{

System.out.println(head.data + " -> ");

head=head.next;

}

System.out.println("NULL");

}

public static void main(String[] args)

push(15);

push(14);

push(13);

push(22);

push(17);

System.out.println("Linked list is : ");

printList(head);

System.out.println("Maximum element in linked list: ");

System.out.println(largestelement(head));

System.out.print("Maximum element in Linked List: " );

System.out.print(smallestElement(head));

}

}

6 0
3 years ago
Cuantos actos ay en el mito de aracne
mash [69]

Answer:

En el mito de Aracne hay un acto, que se desarrolla con cinco escenas.

Explanation:

En el mito de Aracne hay un solo acto, que se desarrolla con cinco escenas. En este mito, la joven Aracne es muy hábil tejiendo, tanto así se enorgullece de su talento que se compara y se considera mejor que la diosa Atenea. Esto último ofende a la divinidad, que le advierte sobre su egocentrismo, lo que lleva a que ambas mujeres participen en una competencia. Aracne demuestra ser muy hábil pero irrespetuosa, lo que hace enfadar a la diosa. Al final, la joven se da cuenta de su error y se ahorca, pero Atenea se apiada de ella y la transforma en una araña.

6 0
4 years ago
Why do you need to cite your sources? (check all that apply)
Shalnov [3]

the answer to this is  2 and 3

Hope this helped

-scav

4 0
3 years ago
How can interference benefit a quantum system?
Marizza181 [45]

Answer:

The interference is where waves enhance or diminish each other is at the heart of creating probability distributions that provide desired results in Quantum Computing

Explanation:

4 0
2 years ago
Other questions:
  • How many degrees of freedom does any unconstrained object have in 3-D modeling?
    6·1 answer
  • The term “gigahertz” refers to how many cycles per second? One thousand One hundred One billion One million
    7·1 answer
  • ZeroIt is a function that takes one argument and returns no value. The argument is a pointer to int. The function stores the val
    15·1 answer
  • Write any two rule of function​
    10·1 answer
  • For what parties the prepare documentation ​
    9·1 answer
  • You upgrade your network to 1000 Mbps from 100 Mbps. You install a new 1000-Mbps network adapter into your Windows system. You c
    12·1 answer
  • Using examples, evaluate the open source model of software development. In your discussion highlight some of its advantages and
    12·1 answer
  • How can I find all the answers for the NWEA MAP Math, English, Reading, and Science tests? Please help!!!!! I found some answers
    6·1 answer
  • Que compone una maquina Rube Goldberg (operadores mecánicos- maquinas simples – mecanismos)
    8·1 answer
  • If we are transferring data from a mobile device to a desktop and receive an error message that the mobile device has stopped co
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!