Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
0% Quality Score
Upvotes Received
0
Posts with Upvotes
0
Upvoting Members
0
Downvotes Received
4
Posts with Downvotes
2
Downvoting Members
3
0 Endorsements
Ranked #55.0K
~616 People Reached
Favorite Forums
Favorite Tags
c++ x 3

3 Posted Topics

Member Avatar for iqra aslam

Mine is a bit too much using just simple for and if loops #include<iostream> #include<stdlib.h> using namespace std; int main() { int a[16]={0},b,i=0; cout<<"\n Enter the number to be converted to binary"; cin>>b; if(b==0) { cout<<"\n 0000"; exit(1); } while(b!=0){ a[i]=b%2; b/=2; i++; if(b==1) { a[i]=1; break; } } for(int …

Member Avatar for Sam_6
-1
228
Member Avatar for tan.revilleza

#include<iostream> using namespace std; int main() { int i=1,a,j=1; cout<<"\n Enter the number until which looping is to be done"; cin>>a; for(i=1;i<=a;i++) { cout<<"\n"; j=1; do { cout<<j; j++; }while(j<=i); if(i==a) { for(int k=a-1;k>0;k--) { cout<<"\n"; j=1; do { cout<<j; j++; }while(j<=k); } } } for(int p=a;p>0;p--) { cout<<"\n"; j=1; …

Member Avatar for Sam_6
-1
263
Member Avatar for kanaly.john
Re: c++

Ok, this maybe the only time you are getting help for your homework.. #include<iostream> using namespace std; int main() { int a,b; cout<<"\n Enter the numbers, only between 3000000 and 5000000..."; cin>>a>>b; if(3000000>=a<=5000000 && 3000000>=b<=a) cout<<"\n The sum is.."<<a+b; cin.get(); }

Member Avatar for Sam_6
0
125

The End.