lesson 23: building a stock market

0 Otsile kgaladua · October 12, 2015
//building a stock market 
 
#include<istream> 
#include<cmath> 
 
using namespace std ; 
 
int main () { 
  
 float a ; 
 float p = 10000 ; 
 float r = .01 ; 
  
 for ( int day = 1 ; day <= 20 ; day++ ){ 
  a = p * pow (1+r , day) ; 
  cout « day « "---------" « a «endl;


But thn my compiler (Dev- c++ ) gives an error. Its says cout was not included in this scope. What should i do. Thanks in advance 

Post a Reply

Replies

Oldest  Newest  Rating
0 Cardinal Coog · October 13, 2015
You have "#include<istream>". You need to change that to "#include<iostream>".
0 c student · October 13, 2015
you forgot the "<<"
  • 1

C++

107,058 followers
About

Used in many types of software including music players, video games, and many large scale applications.

Links
Moderators
Bucky Roberts Administrator