- Upvotes Received
- 0
- Posts with Upvotes
- 0
- Upvoting Members
- 0
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
Hi i need to make a method that does the example below if the array contains these number -12 3 -12 4 1 1 -12 1 -1 1 2 3 4 2 3 -12 The output should be: N Count 4 2 3 3 2 2 1 4 -1 1 … | |
Hi the project i have is Write a program that displays diamonds as text using a character provided by the user. For example, a diamond of height 6 constructed from asterisks will display as follows: __* _*** ***** ***** _*** __* (I cant make it line up perfectly... ) after … | |
This is just a part of a program When my code asks me Enter diamond size ("short", "average", or "tall"): how do i make it so that if i don't put anything and press enter it asks me exactly same questions again?? i tried putting input.length() == 0 or input.equals("") … | |
C++ program that will implement the popular numerical procedure called Thomas Algorithm. this is my final project in the lab which i have no idea how to start off... and i am really bad at c++ because this was my first ever programming class i ever took in my life... … | |
#include <iostream> using namespace std; bool isPrime (int num) { int counter=0; { for(int i=1; i<=num ; i++) if (num%i==0) counter++; if (counter==2) return true; } return false; } //prints primes void printPrimes (int num) { for(int i=2;i<=num;i++) if (isPrime(i)) cout<<i<<","; } // if there is no prime number between … |