I am using Dev-C++ and my code isn't working. When I compile it it stops at the code C=A. The error message states that I don't have a header and the program doesn't recognize C=A. This is the question and I will give you what code I have.
I do not know what I am doing wrong. Help Please.
Write a program that declares 2 constants A and B, Initialize A=1 and B=2.2, Declare an int named C and a float named D, Initialize C=A and D=B, Write statements to print C and D to the screen
Neowin says it's $39.99, but their site says $399.99 after discount. Is Neowin covering the difference? I'll take 7 if they are. Not 8, not 6, never 5, but 7.
Yeah and now they added space above the tab bar, so now I have to painstakingly aim at just slightly below the top of the screen to reach a tab with my mouse.
truly hate it
Question
dana120864
I am using Dev-C++ and my code isn't working. When I compile it it stops at the code C=A. The error message states that I don't have a header and the program doesn't recognize C=A. This is the question and I will give you what code I have.
I do not know what I am doing wrong. Help Please.
Write a program that declares 2 constants A and B, Initialize A=1 and B=2.2, Declare an int named C and a float named D, Initialize C=A and D=B, Write statements to print C and D to the screen
Ok here is my code:
// abcddec.cpp
// example of printing C and D
#include <iostream>
#include <cstdlib>
using namespace std;
int main()
{
int C;
C=A;
A=1;
float D;
D=B;
B=2.2;
cout << "C\n";
cout << "D\n";
system ("PAUSE")
return 0;
}
Link to comment
https://www.neowin.net/forum/topic/660056-c-help-coding-problem/Share on other sites
31 answers to this question
Recommended Posts