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 :+)
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?";
cout<<"care este valoarea laturii y a triunghiului?";
cout<<"care este valoarea laturii z a triunghiului?";
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.
sorry, I posted my own question, please help me there
Registered users can post here. Sign in or register to post.