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

c. your full name

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 :+)
1
2
3
4
5
6
7
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
please help me with this
#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;
}
@queen13 please don't hijack someone else's thread with your own question.
Start your own thread instead.
http://www.cplusplus.com/forum/beginner/223010/
sorry, I posted my own question, please help me there
Topic archived. No new replies allowed.