### How JustAnswer Works:

• Ask an Expert
• Get a Professional Answer
• 100% Satisfaction Guarantee

## Ask helpdesk Your Own Question

helpdesk, Computer Software Engineer
Category: Programming
Satisfied Customers: 70
Experience:  Years of experience on C,C++, java,visual basic
15010891
Type Your Programming Question Here...
helpdesk is online now

# Create a student GPA average calculator. The program should

### Customer Question

Create a student GPA average calculator. The program should prompt the user to enter up to 30 GPAs, which are stored in a single-dimension array. Each time he or she enters a GPA, the user should have the option to calculate the current GPA average or enter another GPA. Sample data for this program is shown below.

GPA: 3.5

GPA: 2.8

GPA: 3.0

GPA: 2.5

GPA: 4.0

GPA: 3.7

GPA Average: 3.25

Hint: Be careful to not calculate empty array elements into your student GPA average.
Submitted: 5 years ago.
Category: Programming
Expert:  helpdesk replied 5 years ago.
Hi,
Do You need your program to be done in c or C++ OR what programming language do you prefer?
Expert:  Hirash Riyal replied 5 years ago.
Following is the Code you need
//code starts here

#include<stdio.h>
#include<stdlib.h>
#include<conio.h>
#include<string.h>
int index=-1,k=0;
void main()
{

char inp[256]="   ";
double gpa[30];
double totalgpa,avegpa;
clrscr();
printf("***** Welcome To GPA Calculator ***** \n");
while(inp[0]!='q')
{
printf("%s%d%s","Enter The Next GPA Value(",index+1,") or Enter q to stop \n"   );
gets(inp);
if(inp[0]=='q'|| index==29)
{
break;
}

gpa[++index]=atof(inp);
}
printf("calculating Average GPA...\n" ) ;

for( k=0;k<index+1;k++)
{
totalgpa+=gpa[k];

}
avegpa=totalgpa/(index+1);
printf("%s%f%s%f","Total GPA Is ",totalgpa," Average GPA Is ",avegpa);

getch();
}

//code ends here
Customer: replied 5 years ago.
GOOD JOB. THANK YOU
Customer: replied 5 years ago.

INTERESTED IN ANOTHER?

Build a C program (not C++) that uses a single-dimension array to store 10 numbers input by a user. After inputting the numbers, the user should see a menu with two options to sort and print the 10 numbers in ascending or descending order.

Expert:  Hirash Riyal replied 5 years ago.
hi,
I Can,t Do It because Another Expert is Already Involved With that Question
Expert:  helpdesk replied 5 years ago.
Hi,
Here is your code
******************************************************************************************
#include<stdio.h>
#include<conio.h>
#include<string.h>
#include<stdlib.h>
int main()
{
unsigned int arr[10],i,j,index;
char input;
clrscr();
printf("\n\tEnter The Values into ARRAY :- ");
for(i=0;i<=9;i++)
{
printf("\n\nEnter Element no %u: ",i);
scanf("%u",&arr);
}
for (i = 1; i <10; ++i)
{
index = arr;
for (j = i; j > 0 && arr[j-1] > index; j--)
arr[j] = arr[j-1];

arr[j] = index;
}

printf("\n\n--press 1 if you want the Series sorted in ascending or 2 if you want the Series sorted in descending order--");
scanf("%c",&input) ;
switch(input)
{
case '1':
printf("Series in ascending order is:-") ;
for(i=0;i<=9;i++)
printf("\n\n\t S%u",arr);
break;

case '2':
printf("Series in descending order is:-");
for(j=9;j>=0;j--)
printf("\n\n\t S%u",arr[j]);
break;

}

return 1;

}
helpdesk, Computer Software Engineer
Category: Programming
Satisfied Customers: 70
Experience: Years of experience on C,C++, java,visual basic
helpdesk and 4 other Programming Specialists are ready to help you
Customer: replied 5 years ago.
I sent payment for this answer. I am new to this site so I want to make sure I did this correctly. I hit accept, and I sent the payment. It now has changed from accept to add bonus. DID YOU GET PAYMENT FOR THIS SECOND CODE? If not, please let me know and I will do my best to correct it immediately. Thank you for your assistance.
Expert:  helpdesk replied 5 years ago.
Hi,
I have received your payment.At justanswer we experts get 50% of what you pay.So i would be more than happy to get some bonus.
Bye
Customer: replied 5 years ago.

Mr. Riyal,

Do you have any experience with visual basic. If you do, I am prepared to pay more for a couple of projects using Microsoft VIsual Basic 2008 Express Edition.

Expert:  helpdesk replied 5 years ago.
Hi,
It would be better if you could post the questions here first.it won't cost you.
Customer: replied 5 years ago.

DId that last reply cost me?

The question was:

Do you have any experience with visual basic. If you do, I am prepared to pay more for a couple of projects using Microsoft VIsual Basic 2008 Express Edition.

Expert:  helpdesk replied 5 years ago.
hi,
Ofcourse not.You can post your questions here as a continuation.latter you can open it as a new question and pay the expert who works on your code.

### JustAnswer in the News:

Ask-a-doc Web sites: If you've got a quick question, you can try to get an answer from sites that say they have various specialists on hand to give quick answers... Justanswer.com.
JustAnswer.com...has seen a spike since October in legal questions from readers about layoffs, unemployment and severance.
Web sites like justanswer.com/legal
...leave nothing to chance.
Traffic on JustAnswer rose 14 percent...and had nearly 400,000 page views in 30 days...inquiries related to stress, high blood pressure, drinking and heart pain jumped 33 percent.
Tory Johnson, GMA Workplace Contributor, discusses work-from-home jobs, such as JustAnswer in which verified Experts answer people’s questions.
I will tell you that...the things you have to go through to be an Expert are quite rigorous.

### What Customers are Saying:

• My Expert answered my question promptly and he resolved the issue totally. This is a great service. I am so glad I found it I will definitely use the service again if needed. One Happy Customer New York
< Last | Next >
• My Expert answered my question promptly and he resolved the issue totally. This is a great service. I am so glad I found it I will definitely use the service again if needed. One Happy Customer New York
• Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help. Mary C. Freshfield, Liverpool, UK
• This expert is wonderful. They truly know what they are talking about, and they actually care about you. They really helped put my nerves at ease. Thank you so much!!!! Alex Los Angeles, CA
• Thank you for all your help. It is nice to know that this service is here for people like myself, who need answers fast and are not sure who to consult. GP Hesperia, CA
• I couldn't be more satisfied! This is the site I will always come to when I need a second opinion. Justin Kernersville, NC
• Just let me say that this encounter has been entirely professional and most helpful. I liked that I could ask additional questions and get answered in a very short turn around. Esther Woodstock, NY
• Thank you so much for taking your time and knowledge to support my concerns. Not only did you answer my questions, you even took it a step further with replying with more pertinent information I needed to know. Robin Elkton, Maryland

• ### ATLPROG

#### Satisfied Customers:

7463
MS in IT.Several years of programming experience in Java C++ C C# Python VB Javascript HTML
< Last | Next >
• http://ww2.justanswer.com/uploads/SP/spatlanta2010/2011-6-23_12450_photo.64x64.gif ATLPROG's Avatar

### ATLPROG

#### Satisfied Customers:

7463
MS in IT.Several years of programming experience in Java C++ C C# Python VB Javascript HTML
• http://ww2.justanswer.com/uploads/ComputersGuru/2010-02-13_051118_Photo41.JPG LogicPro's Avatar

### LogicPro

#### Satisfied Customers:

5603
Expert in C, C++, Java, DOT NET, Python, HTML, Javascript, Design.
• http://ww2.justanswer.com/uploads/unvadim/2010-11-15_210218_avatar.jpg unvadim's Avatar

### unvadim

#### Satisfied Customers:

1158
Good knowledge of OOP principles. 3+ years of programming experience with Java and C++. Sun Certified Java Programmer 5.0.
• http://ww2.justanswer.com/uploads/lifesaver333/2010-10-17_191349_ls.jpeg lifesaver's Avatar

### lifesaver

#### Satisfied Customers:

950
Several years of intensive programming and application development experience in various platforms.
• http://ww2.justanswer.com/uploads/EH/ehabtutor/2012-8-2_202016_1.64x64.jpg ehabtutor's Avatar

### ehabtutor

#### Satisfied Customers:

864
Bachelor of computer science, 5+ years experience in software development, software company owner
• http://ww2.justanswer.com/uploads/RA/rajivsharma086/2012-6-6_17128_displaypic.64x64.jpg Raj's Avatar

### Raj

#### Satisfied Customers:

860
BE CS, 4+ Experience in Programming and Database (ERP)
• http://ww2.justanswer.com/uploads/eljonis/2010-01-06_130406_eljon2.jpg Eljon's Avatar

### Eljon

#### Satisfied Customers:

590
11 yrs of programming (PHP, WordPress, XSL, SQL, JavaScript)

## Related Programming Questions

Chat Now With A Programmer
helpdesk
28 Satisfied Customers
Years of experience on C,C++, java,visual basic