- Upvotes Received
- 0
- Posts with Upvotes
- 0
- Upvoting Members
- 0
- Downvotes Received
- 11
- Posts with Downvotes
- 8
- Downvoting Members
- 6
Re:
task 123454321 123454321 123454321 123454321 123454321 #include<iostream> using namespace std; int main(){ int i,j; for (i=1; i<=5; i++) cout<<i; for(j=4; j>=1; j--) cout<<j; } But what the next ??? |
|
Re:
So we can't just do the top half of the shape, then do another bunch of loops as the opposite to output the second half of the shape. This is what i did, but i'm told it can be done in no more than 3 loops. I can't quite figure … |
|
Re:
I am beginner and still learning c++. So this was a question in my assignment to make a horizontal bar chart something like this, Example: Input: N1=>8 , N2=>6 , N3=>2 , N4=>10 , N5=>9 10 * 09 * * 08 * * * 07 * * * 06 * … |
|
Re:
I'm trying to write a function that will draw a right triangle that will ascend and then descend after the max height is reached. It is to be drawn using the asterisk symbol. I'm fairly new to recursion and that is the primary method I need to use to solve … |
|
#include <stdio.h> int main(){ int i,j,k=1; int loop_count = 10; for(i=1;i<loop_count;i++){ if( i > 1){ for(j=0;j<i+k;j++){ if( i == 2 ) printf("*"); else{ if( j%k == 0) printf("*"); else printf(" "); } } k++; }else printf("*"); printf("\n"); } return 0; } |
|
Doing simple domain name search Just enter sometimes Segmentation fault I really do not know how to solve this problem But some can be found ip i not idea Read what information can solve this problem I'm sorry my English is very poor |
|
Re:
pls can i get a code for the following example 1 ** 234 **** 56789 ****** |
|
Re:
#include<conio.h> #include<iostream> #include<stdlib.h> using namespace std; class SStack { private: int *arr=NULL; int top=0; public: SStack(int size) { arr=new int[size]; } SStack() { arr=new int[5]; } void push(int x) { if(top>5) { cout<<"stack is full"; return; } arr[top++]=x; cout<<"successfully inserted:"<<x; } void pop() { if(top<0) { cout<<"stack is empty"; return; … |
|
Re:
Guys I need some help... This is my program... #include<iostream> using namespace std; int main() #include<iostream> using namespace std; int main() { int a=1; int b=5; cout<<"*"; cin>>a; while <a=>5>; { cout<<"*"; ++a } return 0; } { And this will be the output of my program. * ** *** … |
|
Re:
Good day guys, I would just like to share my code and wanted to do something about it. This code shows a loop inside a loop initializing a two-dimensional array named arr with elements [2] and [5]. Here's my code: #include <iostream> #include <conio.h> using namespace std; int main () … |
|
Re:
***** **** *** ** * Can someone help me with this ^ pattern above? I only can do this one below *** ** * |
|
Re:
Write a C++ program that will print the pattern as shown below: Output: * *** ***** ******* ********* ********* ******* ***** *** * |
|
Re:
Can you please help me do a asterisks of pyramid using the drawbar function, im new to c++ please help. Thank you in advance this is the drawbar function: the output should look like: * *** ***** ******* /*Overloaded drawbar() program.*/ #include<iostream.h> void DrawBar(int Length) /*Diplays a bar of asterisks … |