473,503 Members | 2,126 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Compiling Error

11 New Member
I'm not sure if it's a flow issue or I'm missing some code, but I'm having a lot of trouble compiling this program. It is a Grade Calculator averaging the HW, Proj, and Exam and weighing them to find the final grade. Please help.

#include <stdio.h>
int man()

{

int my grade; /* user's grade */

printf ("welcome.....");

printf("Enter HW1 score (out of 100");
scanf("%d"; "HW1=a");

printf("Enter HW2 score (out of 100");
scanf("%d"; "HW2=b");

printf("Enter HW3 score (out of 100");
scanf("%d"; "HW3=c");

printf("Enter Proj1 score (out of 100");
scanf("%d"; "Proj1=A");

printf("Enter Proj2 score (out of 100");
scanf("%d"; "Proj2=B");

printf("Enter Proj3 scanf("%d"; "HW1=a");
scanf("%d"; "Proj3=C");

printf("Enter Proj4 score (out of 100");
scanf("%d"; "Proj4=D");

printf("Enter Exam1 score");
scanf("%d"; "Exam=E");

printf("Enter Exam2 score");
scanf("%d"; "Exam2=F");

printf("Enter Exam3 score");
scanf("%d"; "Exan3=G");

Avg_HW=(a+b+c)/3=v1
Avg_Proj=(A+B+C+D)/4=v2

return 0;
Apr 2 '08 #1
4 897
weaknessforcats
9,208 Recognized Expert Moderator Expert
Yeah, I can seet that.

1) main() is mis-spelled
2) your parentheses are not balanced in all cases
3) you cannot scanf() into a literal. You need a variable. If you meant to display befoire scanning, then use a printf() before the scanf(). All the sacnf() wants is the kind of data (the % specifier) and the address of the variable where the data is to go.

Good luck.
Apr 2 '08 #2
marmar12
11 New Member
i have one main question though, in order for me to store the numbers that the user is going to input, do i use scanf or some other command?
Apr 3 '08 #3
sanctus
84 New Member
Also, I do not know if
Expand|Select|Wrap|Line Numbers
  1. int my grade
  2.  
is allowed since it is made of 2 words... Shouldn't it be:
Expand|Select|Wrap|Line Numbers
  1. int my_grade
  2.  
Apr 3 '08 #4
weaknessforcats
9,208 Recognized Expert Moderator Expert
i have one main question though, in order for me to store the numbers that the user is going to input, do i use scanf or some other command?
Yes, you use scanf() or any of the other commands than fetch data from the standard input.
Apr 3 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

0
2049
by: Martin Bless | last post by:
I need to access a MSSQL database (MS-Sql, not MySQL!)and would very much like to use mssql-0.09.tar.gz which is available from http://www.object-craft.com.au/projects/mssql/download.html ...
11
3165
by: Arturo DiDonna | last post by:
Hello everyone. I am trying to compile someone else code and I am stuck with compilation problems using the g++ 3.3 compiler. Basically, when compiling the following code, I get this error...
4
11328
by: Aaron Queenan | last post by:
When I build a C++ library to .NET using the managed C++ compiler, I get the following error message: Linking... LINK : error LNK2020: unresolved token (0A000005) _CrtDbgReport LINK : error...
8
2180
by: WebSnozz | last post by:
I have an application written in C that does a lot of low level stuff. It does a lot of things like casting from void*'s. I want to create a new GUI for it in either C# or MC++, but reuse the...
2
11249
by: renagade629 | last post by:
Can anybody help me understand what i'm doing wrong or what I'm missing? Is there anyother good and commendable C++ program I can use (free) from the internet like Dev C++? I'm having trouble doing...
0
7205
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7093
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7353
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7011
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7468
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5023
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4689
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3170
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
401
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.