SlideShare a Scribd company logo
/*Inverted Triangle*/
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int w=6;
for(int g=0;g<9;g++)
{
cout<<"*";
}
cout<<"n";
for(int a=1;a<=3;a++)
{
for(int b=0;b<a;b++)
{
cout<<" ";
}
cout<<"*";
for(int c=1;c<w;c++)
{
cout<<" ";
}
cout<<"*"<<"n";
w=w-2;
}
for(int e=1;e<=1;e++)
{
for(int f=4;f>=e;f--)
{
cout<<" ";
}
cout<<"*";
}
getch();
}
/* Triangle */
#include<iostream.h>
#include<conio.h>
int main()
{
clrscr();
int i,j,sp,x=1;
for(i=1;i<=4;i++,x=x+2)
{
for(sp=1;sp<=4-i;sp++) cout<<" ";
for(j=1;j<=x;j++)
{
if(i>1&&i<4&&j>1&&j<x)
cout<<" ";
else
cout<<"*";
}
cout<<"n";
}
getch();
}
/*Take input of Three n.o if the are not Equal,then find the Smallest
n.o*/
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int a,b,c;
cout<<"Entr 1st n.o = ";
cin>>a;
cout<<"Entr 2nd n.o = ";
cin>>b;
cout<<"Entr 3rd n.o = ";
cin>>c;
if((a<b)&&(a<c))
cout<<"Smallest n.o is = "<<a;
else if((c<a) && (c<b))
{
cout<<"Smallest n.o is = "<<c;
}
else if((b<a) && (b<c))
{
cout<<"Smallest n.o is = "<<b;
}
else
{
cout<<"All n.o are Equal";
}
getch();
}

More Related Content

PDF
C++ Programming - 14th Study
PDF
Ooprc4 b
PDF
C++ Programming - 3rd Study
DOC
oop Lecture 4
PDF
Implementation of c string functions
DOCX
HOTEL MANGEMENT
PDF
Operator overloading
C++ Programming - 14th Study
Ooprc4 b
C++ Programming - 3rd Study
oop Lecture 4
Implementation of c string functions
HOTEL MANGEMENT
Operator overloading

What's hot (15)

DOCX
C programs
DOCX
DOCX
cosc 281 hw2
DOCX
Program membalik kata
PDF
Clock For My
PDF
C++ TUTORIAL 6
DOC
Program(Output)
DOCX
Doubly linklist
PDF
C++ TUTORIAL 7
DOCX
Assignement of programming & problem solving u.s ass.(1)
DOCX
DOCX
Class array
TXT
Problemas de Arreglos en c++
PDF
Oopsprc1e
C programs
cosc 281 hw2
Program membalik kata
Clock For My
C++ TUTORIAL 6
Program(Output)
Doubly linklist
C++ TUTORIAL 7
Assignement of programming & problem solving u.s ass.(1)
Class array
Problemas de Arreglos en c++
Oopsprc1e
Ad

More from Syed Umair (20)

TXT
Assignement code
DOCX
Tree 4
DOCX
Title page
DOCX
DOCX
DOCX
DOCX
Perception
DOCX
New microsoft office word document
DOCX
New microsoft office word document (2)
DOCX
DOCX
C++ 4
DOCX
DOCX
Assignement of programming & problem solving
DOCX
Assignement of discrete mathematics
DOCX
DOCX
DOCX
DOCX
Assignment c++12
DOCX
Assignement of discrete mathematics
DOCX
Truth table a.r
Assignement code
Tree 4
Title page
Perception
New microsoft office word document
New microsoft office word document (2)
C++ 4
Assignement of programming & problem solving
Assignement of discrete mathematics
Assignment c++12
Assignement of discrete mathematics
Truth table a.r
Ad

Recently uploaded (20)

PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PDF
Complications of Minimal Access Surgery at WLH
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PPTX
Cell Structure & Organelles in detailed.
PDF
RMMM.pdf make it easy to upload and study
PPTX
The Healthy Child – Unit II | Child Health Nursing I | B.Sc Nursing 5th Semester
PDF
TR - Agricultural Crops Production NC III.pdf
PDF
VCE English Exam - Section C Student Revision Booklet
PDF
Anesthesia in Laparoscopic Surgery in India
PDF
O7-L3 Supply Chain Operations - ICLT Program
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PDF
01-Introduction-to-Information-Management.pdf
PDF
Insiders guide to clinical Medicine.pdf
PPTX
Pharma ospi slides which help in ospi learning
PPTX
Institutional Correction lecture only . . .
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
Mark Klimek Lecture Notes_240423 revision books _173037.pdf
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PPTX
Introduction to Child Health Nursing – Unit I | Child Health Nursing I | B.Sc...
Module 4: Burden of Disease Tutorial Slides S2 2025
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
Complications of Minimal Access Surgery at WLH
Supply Chain Operations Speaking Notes -ICLT Program
Cell Structure & Organelles in detailed.
RMMM.pdf make it easy to upload and study
The Healthy Child – Unit II | Child Health Nursing I | B.Sc Nursing 5th Semester
TR - Agricultural Crops Production NC III.pdf
VCE English Exam - Section C Student Revision Booklet
Anesthesia in Laparoscopic Surgery in India
O7-L3 Supply Chain Operations - ICLT Program
Renaissance Architecture: A Journey from Faith to Humanism
01-Introduction-to-Information-Management.pdf
Insiders guide to clinical Medicine.pdf
Pharma ospi slides which help in ospi learning
Institutional Correction lecture only . . .
Abdominal Access Techniques with Prof. Dr. R K Mishra
Mark Klimek Lecture Notes_240423 revision books _173037.pdf
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
Introduction to Child Health Nursing – Unit I | Child Health Nursing I | B.Sc...

Assignement c++

  • 1. /*Inverted Triangle*/ #include<iostream.h> #include<conio.h> void main() { clrscr(); int w=6; for(int g=0;g<9;g++) { cout<<"*"; } cout<<"n"; for(int a=1;a<=3;a++) { for(int b=0;b<a;b++) { cout<<" "; } cout<<"*"; for(int c=1;c<w;c++) { cout<<" "; } cout<<"*"<<"n"; w=w-2; } for(int e=1;e<=1;e++) { for(int f=4;f>=e;f--) { cout<<" "; } cout<<"*"; } getch(); } /* Triangle */ #include<iostream.h> #include<conio.h> int main() { clrscr(); int i,j,sp,x=1; for(i=1;i<=4;i++,x=x+2) { for(sp=1;sp<=4-i;sp++) cout<<" "; for(j=1;j<=x;j++) { if(i>1&&i<4&&j>1&&j<x) cout<<" "; else
  • 2. cout<<"*"; } cout<<"n"; } getch(); } /*Take input of Three n.o if the are not Equal,then find the Smallest n.o*/ #include<iostream.h> #include<conio.h> void main() { clrscr(); int a,b,c; cout<<"Entr 1st n.o = "; cin>>a; cout<<"Entr 2nd n.o = "; cin>>b; cout<<"Entr 3rd n.o = "; cin>>c; if((a<b)&&(a<c)) cout<<"Smallest n.o is = "<<a; else if((c<a) && (c<b)) { cout<<"Smallest n.o is = "<<c; } else if((b<a) && (b<c)) { cout<<"Smallest n.o is = "<<b; } else { cout<<"All n.o are Equal"; } getch(); }