- Cout Was Not Declared In This Scope In Dev C Language
- Cout Was Not Declared In Scope
- Cout Was Not Declared In This Scope In Dev C System
![Pdf Pdf](/uploads/1/2/6/4/126477694/520735201.png)
Cout Was Not Declared In This Scope In Dev C Language
#include<iostream>
#include<conio.h>
#include<cmath>
using namespace std;
int main ()
{
char choice, choice1, choice2, choice3, choice4;
int x,y;
double x1,y1;
int answer;
double answer1;
double angle;
cout<<' Welcome to TwoSixEight Geeka Scientific Calculator : ';
cout << ' Coded by Jenell Joanne James';
do
{
cout<<'t1 : Arithmetic Operations n: ';
cout<<'t2 : Trigonometric Functions n: ';
cout<<'t3 : Logarithmic Functions n: ';
cout<<'t4 : Power Functions n: ';
choice = getche();
switch(choice)
{
case '1':
{
cout<<'t1 : Addition n: ';
cout<<'t2 : Subtraction n: ';
cout<<'t3 : Multipilication n: ';
cout<<'t4 : Division n: ';
choice1 = getche();
switch(choice1)
{
case '1':
{
cout<<'Enter first number: ' ;
cin>>x;
cout<<' Enter second number: ';
cin>>y;
answer= x+y;
cout<<'answer '<<answer <<endl;
system('pause');
break;
}
case '2':
{
cout<<'Enter first number: ';
cin>>x;
cout<<'Enter an other number: ';
cin>>y;
answer=x-y;
cout<<'answer is '<<answer<<endl;
system('pause');
break;
}
case '3':
{
cout<<'Enter first number: ';
cin>>x;
cout<<'Enter an other number: ';
cin>>y;
answer=x*y;
cout<<' answer is' <<answer <<endl;
system('pause');
break;
}
case '4':
{
cout<<'Enter first number: ';
cin>>x;
cout<<'Enter an other number: ';
cin>>y;
if(x!=0)
{
answer=x/y;
cout<<'answer '<<answer<<endl;
system('pause');
}
break;
}
}// end of inner switch
break;
}// end of case 1 arithmatic operation
case '2':
{
cout<<'t1 : Sin function n: ';
cout<<'t2 : Cos function n: ';
cout<<'t3 : Tan function n: ';
choice2=getche();
switch(choice2)
{
case '1':
{
cout<<'Enter a angle: ';
cin>>angle;
answer1=(sin(angle));
cout<<'answer is '<<answer1<<endl;
system('pause');
break;
}
case '2':
{
cout<<' Enter a number: ';
cin>>angle;
answer1=(cos(angle));
cout<<'answer is '<<answer1<<endl;
system('pause');
break;
}
case '3':
{
cout<< 'Enter a number: ';
cin>>angle;
answer1=(tan(angle));
cout<<'answer is '<<answer1<<endl;
system('pause');
break;
}
}// inner switch
break;
}//inner case 2 trignomatic
case '3':
{
cout<<'t1 : Natural log n: ';
cout<<'t2 : log with base 10 n: ';
choice3=getche();
switch(choice3)
{
case '1':
{
cout<<' Enter a number: ';
cin>>x1;
answer1=log(x1);
cout<<'answer is '<<answer1<<endl;
system('pause');
break;
}
case '2':
{
cout<<'Enter a number: ';
cin>>x1;
answer1= log10(x1);
cout<<'answer is '<<answer1<<endl;
system('pause');
break;
}
}// end of switch
break;
}// end of case 3 logrithmic
case '4':
{
system('cls');
cout<<'t1 : Press 1 for Power: ';
cout<<'t2 : Press 2 for Square root: ';
cout<<'t3 : Press 3 for square: ';
cout<<'t4 : Press 4 for cude: ';
cout<<'Enter your choice: ';
choice4=getche();
switch(choice4)
{
case '1':
{
cout<<'Enter a number: ';
cin>>x1;
cout<<'Enter power: ';
cin>>y1;
answer1=pow(x1,y1);
cout<<'answer is '<<answer1<<endl;
system('pause');
break;
}
case '2':
{
cout<<'Enter a number: ';
cin>>x;
answer1=sqrt(x);
cout<<'answer is '<<answer1<<endl;
system('pause');
break;
}
case '3':
{
cout<<' Enter a number: ';
cin>>x;
answer1= x*x;
cout<<' answer is'<<answer1<<endl;
system('pause');
break;
}
case '4':
{
cout<<' Enter a number: ';
cin>>x;
answer1 =x*x*x;
cout<<' answer is'<<answer1<<endl;
system('pause');
break;
}
}// end of switch
break;
}// end of case power function
}// outer switch
}while(choice!= '5');
return 0;
}
#include<conio.h>
#include<cmath>
using namespace std;
int main ()
{
char choice, choice1, choice2, choice3, choice4;
int x,y;
double x1,y1;
int answer;
double answer1;
double angle;
cout<<' Welcome to TwoSixEight Geeka Scientific Calculator : ';
cout << ' Coded by Jenell Joanne James';
do
{
cout<<'t1 : Arithmetic Operations n: ';
cout<<'t2 : Trigonometric Functions n: ';
cout<<'t3 : Logarithmic Functions n: ';
cout<<'t4 : Power Functions n: ';
choice = getche();
switch(choice)
{
case '1':
{
cout<<'t1 : Addition n: ';
cout<<'t2 : Subtraction n: ';
cout<<'t3 : Multipilication n: ';
cout<<'t4 : Division n: ';
choice1 = getche();
switch(choice1)
{
case '1':
{
cout<<'Enter first number: ' ;
cin>>x;
cout<<' Enter second number: ';
cin>>y;
answer= x+y;
cout<<'answer '<<answer <<endl;
system('pause');
break;
}
case '2':
{
cout<<'Enter first number: ';
cin>>x;
cout<<'Enter an other number: ';
cin>>y;
answer=x-y;
cout<<'answer is '<<answer<<endl;
system('pause');
break;
}
case '3':
{
cout<<'Enter first number: ';
cin>>x;
cout<<'Enter an other number: ';
cin>>y;
answer=x*y;
cout<<' answer is' <<answer <<endl;
system('pause');
break;
}
case '4':
{
cout<<'Enter first number: ';
cin>>x;
cout<<'Enter an other number: ';
cin>>y;
if(x!=0)
{
answer=x/y;
cout<<'answer '<<answer<<endl;
system('pause');
}
break;
}
}// end of inner switch
break;
}// end of case 1 arithmatic operation
case '2':
{
cout<<'t1 : Sin function n: ';
cout<<'t2 : Cos function n: ';
cout<<'t3 : Tan function n: ';
choice2=getche();
switch(choice2)
{
case '1':
{
cout<<'Enter a angle: ';
cin>>angle;
answer1=(sin(angle));
cout<<'answer is '<<answer1<<endl;
system('pause');
break;
}
case '2':
{
cout<<' Enter a number: ';
cin>>angle;
answer1=(cos(angle));
cout<<'answer is '<<answer1<<endl;
system('pause');
break;
}
case '3':
{
cout<< 'Enter a number: ';
cin>>angle;
answer1=(tan(angle));
cout<<'answer is '<<answer1<<endl;
system('pause');
break;
}
}// inner switch
break;
}//inner case 2 trignomatic
case '3':
{
cout<<'t1 : Natural log n: ';
cout<<'t2 : log with base 10 n: ';
choice3=getche();
switch(choice3)
{
case '1':
{
cout<<' Enter a number: ';
cin>>x1;
answer1=log(x1);
cout<<'answer is '<<answer1<<endl;
system('pause');
break;
}
case '2':
{
cout<<'Enter a number: ';
cin>>x1;
answer1= log10(x1);
cout<<'answer is '<<answer1<<endl;
system('pause');
break;
}
}// end of switch
break;
}// end of case 3 logrithmic
case '4':
{
system('cls');
cout<<'t1 : Press 1 for Power: ';
cout<<'t2 : Press 2 for Square root: ';
cout<<'t3 : Press 3 for square: ';
cout<<'t4 : Press 4 for cude: ';
cout<<'Enter your choice: ';
choice4=getche();
switch(choice4)
{
case '1':
{
cout<<'Enter a number: ';
cin>>x1;
cout<<'Enter power: ';
cin>>y1;
answer1=pow(x1,y1);
cout<<'answer is '<<answer1<<endl;
system('pause');
break;
}
case '2':
{
cout<<'Enter a number: ';
cin>>x;
answer1=sqrt(x);
cout<<'answer is '<<answer1<<endl;
system('pause');
break;
}
case '3':
{
cout<<' Enter a number: ';
cin>>x;
answer1= x*x;
cout<<' answer is'<<answer1<<endl;
system('pause');
break;
}
case '4':
{
cout<<' Enter a number: ';
cin>>x;
answer1 =x*x*x;
cout<<' answer is'<<answer1<<endl;
system('pause');
break;
}
}// end of switch
break;
}// end of case power function
}// outer switch
}while(choice!= '5');
return 0;
}
Cout Was Not Declared In Scope
![This This](/uploads/1/2/6/4/126477694/863658710.png)
C: Variable Scope and 'This' 'Scope' is a concept which can be applied to many things in C, and generally refers to the region of code in which something is accessible. In the case of variables, variables are only accessible after they've been declared in the code.
Cout Was Not Declared In This Scope In Dev C System
- May 31, 2017 Scope of Variables in C In general, the scope is defined as the extent up to which something can be worked with. In programming also the scope of a variable is defined as the extent of the program code within which the variable can we accessed or declared or worked with.
- Apr 05, 2020 variable was not declared in this scope; I need help with Code::Blocks and wxWidgets; exit and clrscr not declared in the scope; c lambda functions and parameters; Error: Not declared in scope. XYZ not declared in this scope,expected ';' before X? I keep getting 'not declared in scope' Not declared in this scope, Help!