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 6858707
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T02:11:34+00:00 2026-05-27T02:11:34+00:00

http://pastebin.com/uws2Ts96 – my program so far I’m attempting to write a C program for

  • 0

http://pastebin.com/uws2Ts96 – my program so far

I’m attempting to write a C program for my class where the program will display a menu giving 3 options, option 1 will lead to the function named ExtractLargestDigit, and option 2 will lead to DigitOccurrence, and option 3 will end the program.

The problem I’m having is that i want to make it so if the user enters any value other than 1 2 or 3 the program will print out WRONG OPTION and reprint out the menu and ask for another option.

I thought the way I was going about it was correct but every time I run the program it crashes. I believe there’s a problem with my while loop.

I also am having problems with the 2 functions:

For the first function I want to have the user enter in a number, for example 123456, and have the program go through each digit of the number and print out the largest digit, and at what position did it occur in the number. For example in this number (123456) the largest digit is 6 and it is in the ones digit position.

For the second function I want the user to enter in 2 numbers (123423) and (452313) and have the program break the numbers down into their digits, assign them to an array, count the number of times each digit occurs and print out a list from 1-0 with the number of times the number occur along side it.

Any thoughts on these problems would be greatly appreciated.

  • 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-05-27T02:11:35+00:00Added an answer on May 27, 2026 at 2:11 am

    You must pass the address of the variable using & to scanf:

    scanf("%d", &option);
    

    That’s why it crashes when you run it.

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

Sidebar

Related Questions

When I run my program core.py ( http://pastebin.com/kbzbBUYd ) it returns: File core.py, line
First of all, here's the full source code: http://pastebin.com/5teGNrPC *> IDENTIFICATION DIVISION. PROGRAM-ID. CAddress.
Here's an example program showing what I'm trying to do: http://pastebin.com/m1de1f3ba The XML in
I am using this class in php for autoloading. http://pastebin.com/m75f95c3b But when I have
I have configured my zend navigation menu like Config: http://pastebin.com/B212uWKz public function _initNavigation() {
I have a class Vec3D (see http://pastebin.com/9Y7YbCZq ) Currently, I allow Vec3D(1,0,0) + 1.2
http://pastebin.com/YyDzQ4Bk this is a plugin for right click context menu, anyone know why it
Here are my classes: http://pastebin.com/3dc5Vb1t When I try to run BookStore b = new
http://www.roguevalleyroses.com/rose_list.php?search_id=&class=&height=&growth=&color=&bloom_size=&bloom_type=&shade=&fragrance=&disease=&rebloom=&thorns=&zone=&hybridizer=Ashdown%20Roses&date_range=&text=&view=&show=&page=4 This is the page. The code that queries the results is here: http://pastebin.com/d51bfa53f
Edit: You can get the full source here: http://pastebin.com/m26693 Edit again: I added some

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.