### Need help

Hey, I am new in the programming world and I was wondering if anyone can help me to solve this problem. ( C++ ) thank you :)

Write variable declarations for the following items:

a. number of children in school

b. a letter grade on an exam

d. the amount due of your last phone bill
Last edited on
A - int

B - char

c - string

d - double / float

Just create a variable with those type.
A unsigned int or better std::size_t

D prefer double over float, the latter precision is easily exceeded. Google it :+)
 1234567 the most basic form of variable creation looks like this: type variablename; so for example A unsigned int number_of_kids; ^^^^^^^ ^^^^^ ^^ type variable name ; (most statements end in ; ).
Last edited on
#include <iostream>

using namespace std;

int main()
{float x,y,z;
cout<<"care este valoarea laturii x a triunghiului?";
cin>>x;
cout<<"care este valoarea laturii y a triunghiului?";
cin>>y;
cout<<"care este valoarea laturii z a triunghiului?";
cin>>z;
if(x=y=z) cout<<"triunghiul este echilateral";
else if(x=y)||(x=z)||(y=z) cout<<"triunghiul este isoscel";
else if(x^2=y^2+z^2)||(y^2=x^2+z^2)||(z^2=x^2+y^2) cout<<"triunghiul este dreptunghic";

return 0;
}