program segment that will ask the user if he wants to compute the perimeter and the area of a triangle using scanner.

Not only what looks like a homework question, pretty much copied off the page, but also posted in the wrong place (this is the community centre which is a lounge area for kicking back in) and you didn't even bother to think about adding any detail about the language you are using to do this.

Sigh. Not a good start.

Read the rules in particular this one:

provide evidence of having done some work yourself if posting questions from school or work assignments

and this one:

read the forum description to ensure it is is relevant for your posting

Now, go to the forum which is appropriate to your query in terms of programming language and ask your question again but this time showing the code that you have produced so far and where you are getting stuck with it.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.