- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 11
- Posts with Downvotes
- 10
- Downvoting Members
- 3
16 Posted Topics
Re: check this one out, its the easiest and shortest one: www.programmingtunes.com/a-simple-calculator-in-c/ | |
Re: check this one out: for more details go to http://www.programmingtunes.com/finding-greatest-common-divisor-of-2-numbers-c/ //greatest common divisor of 2 numbers in C++ #include <iostream> using namespace std; void main() { int x = 24; int y = 18; int temp; for(int i = 2; i<y; i++) { if(x%i == 0 && y%i == 0) … | |
Re: check this one: //Creating Digital Watch in C++ #include<iostream> #include<Windows.h> using namespace std; struct time{ int hr,min,sec; }; int main() { time a; a.hr = 0; a.min = 0; a.sec = 0; for(int i = 0; i<24; i++) { if(a.hr == 23) { a.hr = 0; } for(int j = … | |
Re: //Prime Numbers generation in C++ //Using for loops and conditional structures #include <iostream> using namespace std; int main() { int a = 2; //start from 2 long long int b = 1000; //ends at 1000 for (int i = a; i <= b; i++) { for (int j = 2; … | |
Re: For console you can check this one: http://www.programmingtunes.com/creating-timer-c/ | |
Re: check out this one: #include<iostream> #include<Windows.h> using namespace std; struct time{ int hr,min,sec; }; int main() { time a; a.hr = 0; a.min = 0; a.sec = 0; for(int i = 0; i<24; i++) { if(a.hr == 23) { a.hr = 0; } for(int j = 0; j<60; j++) { … | |
Re: try this one: // DMA of 2D array in C++ #include<iostream> #include<iomanip> using namespace std; int main() { int x = 3, y = 3; int **ptr = new int *[x]; for(int i = 0; i<y; i++) { ptr[i] = new int[y]; } srand(time(0)); for(int j = 0; j<x; j++) … | |
Re: check this one: // DMA of 2D array in C++ #include<iostream> #include<iomanip> using namespace std; int main() { int x = 3, y = 3; int **ptr = new int *[x]; for(int i = 0; i<y; i++) { ptr[i] = new int[y]; } srand(time(0)); for(int j = 0; j<x; j++) … | |
Re: Look this out. here we get an easy way to enter string from the user, and then print out the strings length by using the string.length() function, here is only the code, you can get it detailed from: http://www.programmingtunes.com/finding-length-of-a-string-in-c/ now the code is: // Finding length of a string in … | |
Re: check out the below code, that might be helpful: // Operator overloading in C++ //assignment operator overloading #include<iostream> using namespace std; class Employee { private: int idNum; double salary; public: Employee ( ) { idNum = 0, salary = 0.0; } void setValues (int a, int b); void operator= (Employee … | |
Re: you can check out an easy program on the below link: http://www.programmingtunes.com/generation-of-prime-numbers-c/ | |
Re: you should check this out: // Fractional Calculator in C++ #include<iostream> using namespace std; struct fraction { int n,d; int n1,d1; }; int main() { char p; fraction opr; cout<<"enter nomerator of first fraction : "; cin>>opr.n; cout<<endl; cout<<"enter demonerator of first fraction"; cin>>opr.d; cout<<endl; cout<<"enter operation : "; cin>>p; … | |
Re: check this out from the links below, and hopefully you can get your solution: http://www.programmingtunes.com/fractional-calculator-using-c/ http://www.daniweb.com/software-development/cpp/threads/121962/c-fraction-calculator-output-problem | |
Re: It is one of the simplest logics, got it from a blog. in this logic you can limit the random numbers with that given modulus(%) operator inside the for loop,its just a copoy and paste from that blog, but any way check it out: [ // random numbers generation in … | |
Re: check this out: //Palindrome code in C++ //checking a string for Palindrome. #include <iostream> #include <conio.h> #include <string.h> using namespace std; int main() { char strn[80]; int i,j,flag=0,len; cout<<"Enter the string:"; cin.getline(strn,80); len=strlen(strn); for(i=0,j=len-1;i<=(len/2);++i,--j) { if(strn[i]==strn[j]) flag=1; } if(flag) cout<<" the given string is a Palindrome"; else cout<<"The given string … | |
Re: check out this link, i got the answer from here: http://www.programmingtunes.com/finding-length-of-a-string-in-c/ and also check out this discussion, its already answered here: http://www.daniweb.com/software-development/cpp/threads/379836/size-of-c-string |
The End.