Posts

Triangle of Characters(CPP)

Image
How  To Create the Triangle of  Characters in C++ programming Language? #include<iostream> #include<conio.h> using namespace std; int main() { int a,b,N=65; for(a=7;a>=1;a--) { for(b=0;b<a; b++) { cout<<"  "; cout<<char(N); N++; } cout<<endl; } getch(); }   Output Result

Prime Numbers Program(C++)

Image
Finding Prime Number in C++ programming Language? #include<iostream> #include<conio.h> using namespace std; int main() { int Num[10]; for(int i=0; i<10;i++) { line: int count=0; cout<<"Enter The Num.    ..";cin>>Num[i]; for(int a=1; a<=Num[i]; a++) { if(Num[i]==1) { cout<<"Prime Number......"<<endl; goto line; } if(Num[i]%a==0) { count++; } } if(count==2) { cout<<"Prime Number....."<<endl<<endl; } else { cout<<"Not A Prime Number...."<<endl<<endl; } } getch(); } Output Result

Entering the value between 1 to 65 and print Characters

Image
How to print the characters by entering the value between 1 to 65 in C++ programming Language? #include<iostream> #include<conio.h> using namespace std; int main() { int r,c,E; int Num=65; cout<<"Enter The Ending Value .  ";cin>>E; cout<<endl<<endl; for(r=1;r<=E;r++) { for(int i=0; i<=E-r; i++) { cout<<char(Num); Num++; } for(c=1; c<=r; c++) { cout<<"*"; } cout<<endl; } getch(); } Output Result By Entering the value of 45. By Entering the value of 10.

Highest Marks program in CPP Language

Image
Highest Marks checking in programming? #include<iostream> #include<conio.h> #include<string.h> using namespace std; int main() { int x[10]; char name[3][20]; for(int i=0;i<3;i++) { cout<<"enter marks  .."; cin>>x[i]; cout<<"enter name  .."; cin>>name[i]; } int high=x[0]; int loc=0; for(int i=1; i<3; i++) { if(high<x[i]) { high=x[i]; loc=i; } } cout<<"high   =="<<high<<endl; cout<<"name   =="<<name[loc]; getch(); } Output Result

Even/Odd Number Checking Code in CPP

Image
Find The Digit ODD And EVEN via Cpp programming? #include<iostream> #include<conio.h> using namespace std; int main() { int y; cout<<"Enter Num";cin>>y; if(y%2==0) cout<<"Even Num"; else { cout<<"Odd Num";     } getch (); } Output Result By Entering Odd Digit By Entering Even Digit

Multiplication program in CPP Language

Image
Multiplication Program In programming? #include<iostream> #include<conio.h> using namespace std; int main () { int a,b,i,temp=0; cout<<"Enter 1st number .... "; cin>>a; cout<<"Enter 2nd number .... "; cin>>b; for(i=1;i<=b;i++) { temp=temp+a; } cout<<endl<<"Result are:: "<<temp; getch(); } Output Result

Calculating Name and Marks in Cpp

Image
Calculating Name  and  Marks   in Cpp #include<iostream> #include<conio.h> using namespace std; int main() { int x[5]; char Name[5][20]; cout<<"Enter Name ..\t"<<"Enter Marks .."<<endl<<endl; for(int i=0; i<5; i++) { cout<<"      ";cin>>Name[i];     cout<<"\t \t"; cin>>x[i]; } int Max=0; Max=x[0]; int loc=0; for(int i=1; i<5; i++) { if(Max < x[i]) { Max= x[i]; loc= i; } } cout<<endl<<"Maximum Num is ..."<<Max; cout<<endl<<"Name is..   "<<Name[loc]; getch(); } Output Result