C Language Help - Loops - Programming - HWzone Forums
adplus-dvertising
Skip to content
  • Create an account
  • About Us

    Hello Guest!

     
    Please note - in order to participate in our community, comment and open new discussions, you must join as a registered member.

    Our members enjoy many advantages, including the ability to participate in discussions, enjoy raffles and promotions for members of the site, and receive our weekly content directly by email.

    Do not like being harassed by email? You can register for the site but do not submit your registration to the weekly email updates.

C language help - loops


mecharbsc
 Share

Recommended Posts

tch.png.9a6c155a5bfdb3978142d41917b68980.png

 

Edit: I got along with the first stage and got here:

Now the question is how can I sum up all these digits after all the numbers were initially absorbed?

Thanks!

 

#include void main () {// Variables int mis, i = 1, digit, average; int sum_ahadot, sum_asarot, sum_meot, sum_alafim; printf ("Enter 10 numbers with 4 digits each: \ n"); // Input check while (i <= 3) {scanf ("% d", & mis); if (mis> = 1000 && mis <= 9999) {printf ("% d) the number is:% d \ n", i, mis); i ++; } else {printf ("Wrong number! Enter a number with 4 digits: \ n"); i--; }}
Edited By mecharbsc
Link to content
Share on other sites

The operator a 10% gives the unity of a, divide the a by 10 and then the same operator will give you the tens digit, divide again by 10 the operator will give the hundreds ...

Edited By Buck
Link to content
Share on other sites

Join the discussion

You can then join the discussion and then join our community. If you already have an account with us, please Log in now To comment under your username.
Note that: The comment will appear to the surfers after approval by the board management team.

guest
Add a comment

×   The content pasted is with formatting.   Remove formatting

  Only 75 emoji are allowed.

×   Your link has been automatically assimilated.   Show as regular link

×   Your previous content has been automatically restored.   Clear all

×   You can not paste images directly. Upload or insert images from URL.

 Share

  • Latest news

  • Buzz-Zone: Everything hot on the net

×
  • Create new ...

At the top of the news:

new on the site