Recent

Comments

Follow us on Facebook

Monday, 27 November 2017

4. Five different numbers are input in an array. Write a program to determine how many of them are positive, negative, even and odd

- No comments

Five different numbers are input in an array. Write a program to determine how many of them are positive, negative, even and odd #include <iostream> using namespace std; main () { int a[10],pos=0,neg=0,even=0,odd=0; for(int i=0;i<10;i++) {...

find sum and avg of number using array in c+= for loop

- No comments

find sum and avg of number using array in c+= for loop #include <iostream> using namespace std; main () { int n[10],sum,avg; for(int i=0;i<10;i++) { cout<<"enter the number"<<i+1<<"   =  "; cin>>n[i]; } for (int i=0;i<10;i++) {...

Sunday, 26 November 2017

how to find maximum and minimum number using array

- No comments

how to find maximum and minimum number using array #include<iostream> using namespace std; main(){ double v[5]; for (int i=0;i<5;i++) { cout<<"enter the value of interger  "; cin>>v[i]; }  double max = v[0];  double min = v[0];...

how to make snake game using c++

- No comments

make snake game in c++ #include <iostream> #include <conio.h> #include <windows.h> using namespace std; bool gameOver; const int width = 50; const int height = 20; int x, y, fruitX, fruitY, score; int tailX[100], tailY[100]; int...

Monday, 20 November 2017

Arithmetic Operations *********************************************************************************** 1) Press ‘ +‘ to add two numbers 2) Press ‘-‘ to subtract two numbers 3) Press ‘/’ to divide two numbers 4) Press ‘*’ to multiply two numbers *********************************************************************************

- No comments

QNo1. ***********************************************************************************                                                                 Arithmetic  Operations                                                                                 *********************************************************************************** 1)      Press  ‘ +‘  to add two  numbers 2)      Press  ‘-‘  to subtract two numbers 3)      Press ‘/’  to divide two numbers 4)      Press ‘*’ to multiply two numbers ************************************************************************************...

Sunday, 12 November 2017

Write a program to generate Fibonacci number up to 500. Consider the following sequence of numbers: 1, 1, 2, 3, 5, 8, 13, 21, 34,....

- No comments

C++ Program to Generate Fibonacci Series Fibonacci Series is in the form of 0, 1, 1, 2, 3, 5, 8, 13, 21,...... To find this series we add two previous terms/digits and get next term/number. Fibonacci Series...

Write a program to print the multiplication table of the number entered by the user.

- No comments

    Write a program to print the multiplication table of the number entered by the user. #include <iostream> using namespace std; int main() {     int n;     cout << "Enter a positive integer: ";...

Write a program to print all prime numbers from 1 to 300.

- No comments

int main () { for (int i=2; i<300; i++) for (int j=2; j<i; j++) { if (i % j == 0) break; else if (i == j+1) cout << i << " "; } return 0; }...

Armstrong numbers

- No comments

Write a program to print all Armstrong numbers between 1 and 500. If sum of cubes of each digit of the number is equal to the number itself, then the number is called an Armstrong number....

Output Dimond Star Pattern using C++

- No comments

Output Dimond Star Pattern using C++ Output Dimond of Star using c++ #include<iostream.h> #include<conio.h> using namespace std; main() { int i, j, k; for(i=1;i<=5;i++) { for(j=i;j<5;j++) { cout<<" "; } for(k=1;k<(i*2);k++) { cout<<"*"; } cout<<"\n"; }...

last * pattern in C++

- No comments

  last * pattern in C++ Print Star Triangle #include<iostream.h> #include<conio.h> using namespace std; main() { int i, j, k; for(i=5;i>=1;i--) { for(j=5;j>i;j--) { cout<<" "; } for(k=1;k<=i;k++) { cout<<"*"; } cout<<"\n"; } getch(); } Output...

Page 1 of 6123»

Write a program, that takes 16-Elements in Two-Dimensional-Array that has 4 rows & 4 columns, then display the diagonal of Matrix.

Write a program, that takes 16-Elements in Two-Dimensional-Array that has 4 rows & 4 columns, then display the diagonal of Matrix. ...

propeller ads

PropellerAds