🔒 Closed Mga sir pa help

Status
Not open for further replies.
Mga idol na magagaling sa programming pa help naman po dito kung paano po ito ma code sa c++ language super noob po talaga ako sa programmingIMG_20210712_151703.webpIMG_20210712_151641.webp
 
[CODE lang="cpp" title="Ganto ?"]#include <iostream>

using namespace std;

char Name[128];
int birthyear;
int main()
{
cout<<"Please Enter Your Name: ";
cin >> Name;
cout<<"Please Enter Year of Birth: ";
cin >> birthyear;
cout << endl;

cout<<"Hello there, " << Name <<" !"<<endl;
cout<<"--------------------------"<<endl;

int age = 2021 - birthyear;

cout<<"|You are now "<<age<<" years old|"<<endl;
cout<<"--------------------------"<<endl<<endl;

cout<<"============Thank You========"<<endl;
return 0;
}
[/CODE]
[CODE lang="cpp" title="area of triangle"]#include <iostream>

using namespace std;

double base;
double height;
int main()
{
cout<<"======================================="<<endl<<endl;
cout<<" --- COMPUTE THE AREA OF THE TRIANGLE ----"<<endl;
cout<<"What is the length of base of the triangle? ";
cin >> base;
cout<<"What is the length of height of the triangle? ";
cin >> height;
cout << endl <<endl;


double area = (base * height) / 2;

cout<<"The are of the triangle is: "<< area << "." <<endl<<endl<<endl;

cout<<"============Thank You========"<<endl;
return 0;
}
[/CODE]

di ako programmer sana makatulong ^^
 
Status
Not open for further replies.

About this Thread

  • 3
    Replies
  • 353
    Views
  • 3
    Participants
Last reply from:
Arcturus

Trending Topics

Online now

Members online
1,048
Guests online
1,515
Total visitors
2,563

Forum statistics

Threads
2,294,932
Posts
29,094,144
Members
1,206,613
Latest member
cheeseterrific
Back
Top