Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8723163
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T07:33:58+00:00 2026-06-13T07:33:58+00:00

I just wrote this and i cant find problem. I work with codeblocks and

  • 0

I just wrote this and i cant find problem. I work with codeblocks and it writing this problem

error: expected 'while' before '{' token
=== Build finished: 1 errors, 1 warnings)

But I cant wrote while there , because its not correct. Can someone help me please? Sorry for my eng.

printf("Put numbers for some reason\n");

int cislo;
int s0,s1,s2,s3,s4,s5,s6,s7,s8,s9;

while(scanf("%d",&cislo)==1){
   if (cislo<0)
      printf ("Cislo %d, je zaporne, takove neberu", cislo);
}

s0=s1=s2=s3=s4=s5=s6=s7=s8=s9=0;


do (cislo/10);
    {
    switch (cislo%10);

    case 0; ++s0;  break;
    case 1; ++s1;  break;
    case 2; ++s2;  break;
    case 3; ++s3;  break;
    case 4; ++s4;  break;
    case 5; ++s5;  break;
    case 6; ++s6;  break;
    case 7; ++s7;  break;
    case 8; ++s8;  break;
    case 9; ++s9;  break;
    }

 while (cislo>0);

 printf("0  %d x \n 1  %d x \n 2  %d x \n 3  %d x \n 4  %d x \n 5  %d x \n 6  %d x \n 7  %d x \n 8  %d x \n 9  %d x \n",s0,s1,s2,s3,s4,s5,s6,s7,s8,s9);

 return 0;
}

In the final it must print something like this:

100
Number: 100 include this numbers :
0 ...  2x
1 ...  1x
2 ...  0x
3 ...  0x
4 ...  0x
5 ...  0x
6 ...  0x
7 ...  0x
8 ...  0x
9 ...  0x
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T07:33:59+00:00Added an answer on June 13, 2026 at 7:33 am
    do 
    {
    cislo /= 10;
    switch (cislo%10);
    
    case 0; ++s0;  break;
    case 1; ++s1;  break;
    case 2; ++s2;  break;
    case 3; ++s3;  break;
    case 4; ++s4;  break;
    case 5; ++s5;  break;
    case 6; ++s6;  break;
    case 7; ++s7;  break;
    case 8; ++s8;  break;
    case 9; ++s9;  break;
    }
    

    while (cislo>0);

    Try this?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I wrote a program to solve a complicated problem. This program is just a
This just won't work. The problem is that I do not know enough to
I just wrote this into my WebForms .aspx: <span id=GenerateChartButton runat=server></span> I went to
I'm really confused, I just wrote this x = 0 y = 42 #Can
Just for fun, I wrote this simple function to reverse a string in Python:
I just wrote this backup script: #!/usr/bin/bash # the number of days to do
I'm just wondering if there is a best case to write this code: $('#set_duration_30').click(function(event)
I might be insane to write this here, but I am just too scared
This is just a question on how to write my code for a COM
Maybe I am just over thinking this and need to write some more prototype

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.