answersLogoWhite

0

Let "n" is that number and "occ" is the no of occurrence of a element "el" in "n".

so,

<pre>

i = n;

occ = 0; // Initializing "occ" to zero.

while(i > 0){

rem = i % 10; // This gives a digit in the number.

if(rem == el) occ++; // If "rem" is same as "el" then increament "occ".

i = i / 10; //By this we are extracting rem from number i.

}

printf("No of Occurrence of %d element is : %d", el, occ); // Printing the number of occurences

</pre>

that's it.

User Avatar

Wiki User

9y ago

What else can I help you with?

Related Questions

What is atomic number and where can you find an element's atomic number?

The atomic number is the number of protons in the element. For example calcium has 20 protons, so that means it has an atomic number of 20. You can find the element's number on the periodic table; its usually the number on top of the element's symbol


How do you find the number of protons and neutrons in an element?

The number of protons in an element is equal to its atomic number, which is found on the periodic table. To find the number of neutrons, subtract the atomic number from the atomic mass of the element.


What is an atomic number and where can you find one listed?

the atomic number is the number of protons of an element. The atomic number specifically identifies an element. You can find it on the Periodic Table of Elements.


How to find the total electron in element?

To find the total number of electrons in an element, first you need to look up the element's atomic number. That number tells you how many protons are in the element. Then, look up the net charge of the element. The number of protons subtracted by the elements net charge will give you the number of its electrons.


How do you find the atomic number of an element?

The atomic number of an element is found by counting the number of protons in the nucleus of an atom of that element. It is the same as the number of electrons in a neutral atom.


What is the atomic number of atoms?

how do you find the atomic number for an element?


What is the atomic number of the element radon?

We can find radon as a non metal element. Atomic number of it is 86.


How do you search for an element in the mesh by its number in Hypermesh?

In Hypermesh, to search for an element in the mesh by its number, you can use the &quot;Find&quot; function. Go to the &quot;Edit&quot; menu, then click on &quot;Find Entities.&quot; Enter the element number you are looking for, and Hypermesh will highlight the element if it exists in the mesh.


How to find the elctron of an element?

Finding the electron of an element is easy. In if find through atoms which positively charged protons and the negatively charged electrons.


How do you find the atomic number of an element?

Look it up in "periodic table of elements" You can find the number of a particular element by looking at the Periodic Table; you can also do this by counting the number of protons in the nucleus.


How many protons are in an atom of a pure element?

Each chemical element has a specific number of protons; the number of protons is equal to atomic number of the element.


How do you find the number of protons electrons of an element?

The atomic number of the element is the number of protons, therefore there has to be the same amount of electrons to protons.