Sharp Tutorial
sample program in c++

Python

Java

C

C++

HTML/CSS

Java Script

PHP

SQL

C Programs

introduction to c++

  • C++ Home
  • Introduction to C++
  • History features
  • Sample Programs
  • cout , cin , endl
  • Data type and Operators
  • if else in c++
  • loop in c++

Oops in C++

  • Object / Class
  • Constructor
  • Function & Constructor Overloading
  • Inheritance
  • Overriding

Advanced C++

  • Strings in C++
  • Exception Handling
  • Special Functions
  • C++ Programs

Sample program in c++

Here we create a program to find the area and peramter if the length and breadth is given

C++ Program to find area and parameter.

#include<iostream>
using namespace std;
int main()
{
int length=50,breadth=20,area=0,per=0; area=length*breadth; per=2*(length+breadth); cout<<"area= "<<area << "perimeter= "<<per; return 0;
}

Above program displays the following output

Enquiry about Course

Ask your Question

Click Here

Sharp (2) Tutorials

Video/ C Introduction

Watch video in full size

Video tutorial

Follow by Email
Facebook
Facebook
fb-share-icon
YouTube
Copyright © Sharp Tutorial
Build with WordPress
Wordpress Social Share Plugin powered by Ultimatelysocial
Sharp Tutorial