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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T11:08:05+00:00 2026-06-13T11:08:05+00:00

//Program Written By: Andre Chitsaz-zadeh //Program Written On: 10/7/12 //Program calculates book cost for

  • 0
//Program Written By: Andre Chitsaz-zadeh
//Program Written On: 10/7/12
//Program calculates book cost for multiple book orders. 
//Program written using multiple functions.

#include <stdio.h>
#define SIZE 5

void inputData();
void processingData(int costs[]);
int costs[5];

int main ()
{
    inputData();
    processingData(costs);
}

void inputData()
{
    int i = 0;
    printf( "\nPlease enter five products costs.\n" );
    while(i < 5)
    {
       scanf("%d", &costs[i]);
       i = i + 1;
    }
    printf("stuff");
    for (i = 0, i < 5, i++)
        printf("%d\n", costs[i]);
}

void processingData(int costs[])
{
     int i;
     for (i = 0; i < 4; ++i)
     {
          int j, min, temp;
          min = i;
          for (j = i+1; j < 5; ++j)
          {
               if (costs[j] < costs[min])
                    min = j;
          }

          temp = costs[i];
          costs[i] = costs[min];
          costs[min] = temp;
     }
}

It is lying…. I am not missing any sort of a semi-colon. I have been stuck at this point in the program for a while and it seems like it is something stupid that I am missing. The only time that I get this error is when I am missing semicolons and I have thoroughly checked my program multilple times… Thanks!

  • 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-13T11:08:06+00:00Added an answer on June 13, 2026 at 11:08 am

    Compilers don’t lie.

    In your inputData function:

    for (i = 0, i < 5, i++)
    

    Should be:

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

    Strangely, you got the for loop right in your processingData function.

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

Sidebar

Related Questions

//Program Written By: Andre Chitsaz-zadeh //Program Written On: 10/7/12 //Program calculates book cost for
//Program Written By: Andre Chitsaz-zadeh //Program Written On: 10/7/12 //Program calculates book cost for
That's my program written in C++ (OOP): #include <iostream> #include <string> using namespace std;
I have the below program written in C++: #include <iostream> using namespace std; int
I have a membership program written with PHP and using mysql where users input
Hi I have a program written in C++ in which one or two functions
I have a program written in c# using visual studio 2010 ultimate, and I
I have a program written in C#, running on Linux using Mono. The program
I have a program written in Java using JOGL with which you can draw
I have a program written in AWT, so I am using Frame (Not JFrame/Swing).

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.