- Upvotes Received
- 0
- Posts with Upvotes
- 0
- Upvoting Members
- 0
- Downvotes Received
- 2
- Posts with Downvotes
- 1
- Downvoting Members
- 2
6 Posted Topics
here's d code i tried....it worked for all conversions [CODE] //final conversion-only for decimal input #include<iostream.h> #include<conio.h> #include<string.h> #include<math.h> #include<process.h> main() { //too long....the hex case ruins it all and too many switch cases char a[30],ch; int len,i,j,pos,whole=0,k=0,n=0,r[30],lenr=0,lenq=0,q[30],h=0,base,base1; float frac=0; cout<<"Enter number "; gets(a); cout<<"\nEnter choice-\n1. Decimal (d/D)\n2. Octal (o/O)\n3. …
Hey! I'm using OpenGl GLUT on xcode 5.1.1 on mac osx 10.8.5 and I've can't figure out how to load bmp,jpg or png images as textures to my application. I've tried installing FreeImage and SOIL unsuccessfully. I'm a total newbie and some help would really be appreciated.
I'm making a word unscrambler, an anagram solver of sorts. So, I've stored all possible variations of the word in storedstrings which is an array of strings. Now, i need to delete all the same strings in storedstrings and then store the unique strings in another array of strings. This …
hmmmm....i tried a simple code with unsigned long and it worked until 12! [CODE] #include<iostream.h> #include<conio.h> main() { int i,n,j; unsigned long p=1,q=1; cout<<"Enter number "; cin>>n; cout<<"Factorial is "; for(i=1;i<=12;i++) p*=i; for(j=13;j<=n;j++) q*=j; cout<<p<<endl; cout<<q; getch(); }[/CODE] cn v sumhow store the outputs differently n then display them as …
what your friend did was a bubble sort, here's d code you want- [CODE]#include<iostream.h> #include<conio.h> #include<string.h> #include<stdio.h> main() { char a[10], t; int j=0; cout<<"Enter string: "; gets(a); for(int i=1; i<10; i++) { t=a[i]; j=i-1; while(t<=a[j]&&j>=0) { a[j+1]=a[j]; j--; a[j+1]=t; } } strrev(a); puts(a); getch(); }[/CODE]
/*any suggestions on how to convert a hexadecimal no. into others and vice versa?d code might be long, i'm just 16, dnt be harsh :)*/ #include<iostream.h> #include<conio.h> #include<string.h> #include<math.h> #include<process.h> main() { char a[30],ch; int len,i,j,pos,whole=0,k=0,n=0,r[30],lenr=0,lenq=0,q[30],h=0,base,base1; float frac=0; cout<<"Enter number"; gets(a); cout<<"Enter choice-b,o,h,d"; cin>>ch; len=strlen(a); switch(a[0])//for converting the no. inputted …
The End.
messr135