Posts

Showing posts from March, 2018

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

Simple Array Program In Cpp Language

Image
Calculating 10 integers in array function(Cpp programming Language)? #include <iostream> #include<conio.h> using namespace std; int main ( ) {    int i , a[10];     cout << "Enter 10 integers: "; for(i = 0; i < 10; i ++) cin >> a [ i ]; cout << endl;    cout << "The integers are "; for(i = 0; i < 10; i ++) cout << a [ i ] << " "; cout << endl;    return 0;  }

Factorial Program In Cpp Language

Finding Factorial  Numbers with Cpp programming Language? #include<iostream> #include<conio.h> using namespace std; int main() {     int num [10];     for(int i=0; i<10; i++) { int factorial=1; cout<<" Enter Number To Find Its Factorial:  ";     cin>>num[i];     if(num[i]!=0)     {     for(int a=1;a<=num[i];a++)     {         factorial=factorial*a;     } cout<<"Given Number is "<<num[i]<<"      & Factorial is  ="<<factorial<<endl; } else cout<<"Zero Have No Factorial"<<endl; } getch(); }

Addition program in a CPP Language

Image
How to add Five numbers with Cpp programming? #include <iostream> #include<conio.h> using namespace std; int main () { int foo [5] = {16, 2, 77, 40, 12071}; int n, result=0;   for ( n=0 ; n<5 ; ++n )   {     result += foo[n];   }   cout << result; getch(); } Output Result

How To Print Characters

Image
How to print different characters via CPP programming? #include<iostream> #include<conio.h> using namespace std; int main() { int a; for(a=0; a<=254; a++) { cout<<a<<"\t"<<char (a)<<endl; } getch(); }   Output Result

Introduction To Programming Language

Image
Programming Language: Programming language is a language program that can be used to compile programs, scripts,or other computer software that can be applied to computers. The following is a list of different program and scripting languages ​​that are included on our site. Computer programming languages: Who invented first programming language: The official computer's first computer language is obligatory, prepared by Zendera Zuse in 1943 and 1945. However, until 1998 , it has not been implemented. In 1949, the short-cut of John Mochi was believed to be the first language of the program. It is designed to represent financial statements in a way that is readable by people. However, because it was implemented before the machine code was translated, it was relatively slow. Other pre-programmed languages ​​ were developed in the 1950s and 1960s , with auto-coding, including COBOL , FLOW - MATIC , and LISP . Only COBOL and LISP are used. Some not