🔒 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 programming
IMG_20210712_151703.webp
IMG_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.

Similar threads

About this Thread

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

Trending Topics

Online now

Members online
347
Guests online
564
Total visitors
911

Forum statistics

Threads
2,274,604
Posts
28,957,156
Members
1,234,344
Latest member
Ivokoiiii01
Back
Top