Закрыт

My short course doesn't teach how to add an list to my loops and I would like to learn how to.

Request detail

My code

' ' '

#include <stdio.h>

int main(){

int games;

int red;

int yellow;

int green;

int num, j;

int n=1;

double Ave;

int k;

scanf("%d", &games); // Take the users input and store it as red yellow green

for(j=0; j<games; j++) {

scanf("%d %d %d", &red, &yellow, &green); // store r y g as int's

}// I need to store red yellow green values in a list of some sort <-- 1st

//problem

for(int i=0; i<games; i++){

printf("%d.", i+1);

// need this to take values for red green yellow from a list for this equation

//<-- 2nd problem

num = (green*100)+(yellow*10)+red; // flip the colour values to create a 3-

//diget int

printf(" you rolled: %d, ", num); // first half of sent'ce with 3-didget int

Ave = num/n; // Equation for average value

printf("current average: %.1lf",Ave); // second half of sent'ce with running

//average

printf("\n");

n=n+1;

}

return 0;

}

' ' '

I want this to print the values from the scanf commands THEN print the sentences.

it should read 1. your number: xxx, average x1\n.... with the x values equaling the user input (reversed and converted to a 3-digit number) and the average being the sum of all 3-digit values up to that point, but I can't figure out how to do it (we haven't been taught arrays and "other.h" isn't accepted by our sandbox) any ideas or suggestions on how I can approach this?

Навыки: Программирование на C++, Программирование на С, Математика, Архитектура ПО, Программирование на C#

Показать больше: why do programmers like to use functions?, advanced for loop in python, free online java courses with certificate of completion, udacity java free course, what do you gain from using loops in your code, python loop through table, free java course for beginners, for loop python, sharepoint custom activity add list, vba excel add list references, msn chat bot auto add list, add list remove list javascript checkbox, want add list mysql tables, network short course lahores 1990s, computer short course lahore, web development short course lahore, extjs sample add list update, add list cities country drop list, javascript ajax add list cookie, access screen add list

О работодателе:
( 1 отзыв ) Băilești, Romania

ID проекта: #26813135

14 фрилансеров(-а) готовы выполнить эту работу в среднем за $13/час

hbxfnzwpf

I am very proficient in c and c++. I have 18 years c++ developing experience now, and have worked for more than 10 years. My work is online game developing, and mainly focus on server side, using c++ under Linux enviro Больше

$20 USD / час
(189 отзывов(-а))
7.2
idleswell

Thanks for your project. I have 30 years experience programming in C and C++. We can schedule an hour lesson about how to organize code for this project so that it can be both functional and clear both from the code a Больше

$30 USD / час
(185 отзывов(-а))
6.2
harissheikh255

Hello,I will do simplest coding in C++,C using OOP,data structures [login to view URL] looks like an assignment so coding will be easily understandable for u.I have done many C/C++ works [login to view URL] have a chat for further detai Больше

$12 USD / час
(44 отзывов(-а))
4.9
wanqing525

****C++ Expert*** Hi, there. I have got your project requirement enough. I am a creative and professional C++ developer having more than 5+ years of professional experience as a senior developer in this field. My main Больше

$8 USD / час
(8 отзывов(-а))
3.4
kashmalch

I'm an expert of c programming and have done many object oriented projects. I can help you in your scanf isuue.

$8 USD / час
(9 отзывов(-а))
2.8
alexandrubobei97

Salut. Am observat la country ca ai trecut romana. Am experienta de peste 4 ani in c/c++. Pot sa te ajut cu aceasta problema dar si cu alte notiuni despre c/c++. Scrie-mi pe chat sa discutam mai multe detali

$12 USD / час
(2 отзывов(-а))
2.0
gouravkumargupta

Hi there, I can mentor you for this specific problem. During the process you will be aware of many concepts as well that will allow you to store list of values as per your requirement. Ping me for discussion. Regards Больше

$13 USD / час
(2 отзывов(-а))
2.1
tinsasoft

Hi there I Can do the assignment in one day. I have made many C/C++ projects before. Thanks

$10 USD / час
(0 отзывов(-а))
0.0
jeffrayan

hello sir i am programmer and i can do this task to you. just text me in orivate chat. i am free now we can work now

$15 USD / час
(0 отзывов(-а))
0.0
yovivekverma

I am a Software Development Engineer with around 5+ years of experience that loves developing solutions to improve processes of everyday activities. I bring in an ardent sense of ownership to the products that I build Больше

$15 USD / час
(0 отзывов(-а))
0.0
SuVui

i am interested in this project..if you want we can discuss about it later..i will make sure to get your work done as soon as possible

$12 USD / час
(0 отзывов(-а))
0.0
rizzzak

Can help you with this task, one of my projects you can see in profile. I think there will be enough to use some arrays/structs/vectors. I'll add them and comments for you in your code if you choose me :)

$8 USD / час
(0 отзывов(-а))
0.0
TruthRoe

I'm a programmer with extensive knowledge of the C programming language. I have worked in projects where I progrmme in C and succesfully execute them. I'm available, reliable and ensures quality work.

$8 USD / час
(0 отзывов(-а))
0.0
$13 USD / час
(0 отзывов(-а))
0.0