- Upvotes Received
- 0
- Posts with Upvotes
- 0
- Upvoting Members
- 0
- Downvotes Received
- 11
- Posts with Downvotes
- 8
- Downvoting Members
- 6
14 Posted Topics
Re: #include <iostream> using namespace std; main int num1 = 0; int NumCount = 9; int Rows = 5; for (int j = 0; j < Rows; j++) //{ for (int i = 0; i < NumCount; i++, num1++) // { if (i < 5) cout << i + 1 ; … | |
Re: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; class Program { static void Main(string[] args) { int num = -2; for (int i = 0; i < 10; i++) { if (i < 5) num += 2; else num -= 2; if (num < 0) break; for (int … | |
Re: c#---------------- sample code using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; class Program { // N1=>8 , N2=>6 , N3=>2 , N4=>10 , N5=>9 //10 * //09 * * //08 * * * //07 * * * //06 * * * * //05 * * * * //04 … | |
Re: c++ Code int main() '{' int lengthC = 0; for (int i = 1; i < 10; i++) { if (i > 5) { lengthC += 2; } for (int j = 0; j < (i - lengthC); j++) { cout << "*"; } cout << endl; } '}' c# … | |
#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: it's code int main(){ int i,j,k; int count = 0; for( i=0; i<10; i++ ){ if( i%2 == 0 ) for( j=0; j<i; j++ ){ printf("*"); } else for( k=0; k<i; k++ ){ count++; printf("%d",count); } if( i!= 0) printf("\n"); } return 0; } | |
Re: it's code #include <iostream> #include <stdlib.h> using namespace std; class myStack { private: int *pStack; int Index; int _Size; public: myStack(int Size); void push(int _v); void pop(); void display(); }; myStack::myStack(int Size){ pStack = new int[Size]; Index = 0; _Size = Size; } void myStack::push(int _v){ if( Index > (_Size-1) … | |
Re: it's code include <iostream> using namespace std; int i , j; int lp = 6; //<<= change number 2,3,4,5,6...more for ( i=1; i<lp; i++ ) { for ( j=0; j<i; j++ ) { cout << "*"; } cout << endl; } | |
Re: it's code //main int arr[10] = {0}; int sum[5] = {0}; int i; for ( i=0; i< ( sizeof(arr) / sizeof(int) ) / 2; i++){ arr[i] = i+1; arr[ ( ( sizeof(arr) / sizeof(int) ) / 2 ) + i ] = ( ( sizeof(arr) / sizeof(int) ) / 2 … | |
Re: it's code //main int i , j , lp , PutCout; lp = PutCout = 3;<-- change num 1,2,3,4,5 ... more ^^ bool PutCheck = false; for( i = lp ; i > 0 ; i-- ){ for( j = lp; j > 0; j-- ){ if( j / ( … | |
Re: it's code //#include <iostream> //using namespace std; //main int i , j; int check = 0; int ncout = 0; for( i = 0 ; i<10 ; i++ ){ if ( i > 5 ){ ncout += 4 ; }else if( i == 5 ){ ncout += 2 ; } … | |
Re: #include <iostream> using namespace std; //Modify your way //main int i , j , lp , ishave ; lp = ishave = 3; // <-- change number 1 , 2 , 3 , 4 , 5 , 6 ... more ^^ bool PutCheck = false; int putcount = 1; for( … |
The End.