(create a c program which reads a sequence of daily temperatures for one month, stores them into an array temp and finds the average temperature with a function average.)
ı dont know Dev c++ . how i made this? please help me.

ask for input
store values
send information to average function
return average
print average

how can i write .

The problem you've described is adequate as either the first or second program after hello world for absolute beginners, so if you don't know where to start, I'd say start by learning a little C++.

What do you know about C++? Start with that.

What did your professor and/or textbook cover about C++? Did you get any instruction on using the Dev-C++ editor?

What don't you know about writing the program? Do you know how to:

  • Declare a main() function?
  • #include a header file?
  • Print out something to the console?
  • Read in user input?
  • Declare a simple variable?
  • Declare an array of values?
  • Access an element of an array?
  • Write a for() loop?
  • Add, subtract, multiply and divide two floating-point values?
  • Call a library function?

These are more or less all of the skills needed for the program in question. Which of them don't you understand, and what do you think you know about them?

Just to give you a starting point, here is a basic skeleton of a generic C++ program:

#include <iostream>

int main()
    // your program goes here

Edited 5 Years Ago by Schol-R-LEA: n/a