answersLogoWhite

0


Best Answer

/*

Code by In

contact facebook.com/inderspace :)

Do whatever you like with the code.... :P

*/

#include<stdio.h>

#include<conio.h>

/*==================

*/

int main()

{

int input[20],adone[20]={0},count[20]={0};

int i,j,k,c=0;

printf("\nEnter 20 numbers followed by ',': \n");

for(i=0;i<20;i++){

scanf("%d,",&input[i]); //Here the values are input

}

for(i=0;i<20;i++){

if(!done(input[i],&adone[0])){ //checks to see if number is done before

count[c]=freq(input[i],&input[0]); //if not done that it counts frequency

adone[c]=input[i];

c++;

}

}

for(i=0;i<c;i++)

printf("\n%d = %d",adone[i],count[i]); //output in tabular fashion :)

getch(); //not supported by gcc compilers sorry :(

return 0;

}

User Avatar

Wiki User

11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write a program to input 20 arbitrary numbers in one-dimensional array CalculateFrequency of each number Print the number and its frequency in a tabular form?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

What is 324 in LM324?

An arbitrary identifying number. These numbers are usually selected by the first manufacturer of the part.


Can this integer 6546454564564564564564564564565645645645645645645645645645645645645645645645 be stored in Java exactly if yes then please state the data type?

Certainly not in a primitive data type. You can store it in a String, of course. Now, if you want do treat it as a number and do actual calculations, you can store such large numbers in an object based on the BigInteger class; this class allows you to work with numbers of an arbitrary size, limited only by available memory. (There is also a similar BigDecimal class that allows you to work with numbers with decimals).


How many numbers are there in all?

There are countless of numbers in all.


Ascending order program for java?

public class BubbleSortAscendingOrderDemo { public static void main(String a[]) { //Numbers which need to be sorted int numbers[] = {23,5,23,1,7,12,3,34,0}; //Displaying the numbers before sorting System.out.print("Before sorting, numbers are "); for(int i = 0; i &lt; numbers.length; i++) { System.out.print(numbers[i]+" "); } System.out.println(); //Sorting in ascending order using bubble sort bubbleSortInAscendingOrder(numbers); //Displaying the numbers after sorting System.out.print("Before sorting, numbers are "); for(int i = 0; i &lt; numbers.length; i++) { System.out.print(numbers[i]+" "); } }


How do you get a random number from a group of numbers in C?

Random numbers cannot be generated programatically. For pseudo-random numbers use function 'rand'.