Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
100% Quality Score
Upvotes Received
1
Posts with Upvotes
1
Upvoting Members
1
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
0 Endorsements
~5K People Reached
This member's community profile is only visible to logged in members until they have earned 15 reputation points.
Favorite Forums

13 Posted Topics

Member Avatar for Adnan S.

#include<stdio.h> int main(){ int num; printf("please enter your number\n"); scanf("%d",&num); if(num>0&&num<10){ int ans = num; printf("the answer is %d", ans); } else if(num>=10&&num<100){ int remdr = num%10; int tens = num/10; int ans = remdr + tens; printf("the answer is %d + %d = %d\n", tens,remdr,ans); } else if (num>=100&&num<1000){ …

Member Avatar for sneekula
0
979
Member Avatar for rao naeem

lol.. seriously?? you want a whole game by simply typing that sentence? sorry!

Member Avatar for Stavros_1
0
272
Member Avatar for samson.dadson.3

please i have a little problem creating a class and making it run. The class is created separately as a header file with it's source code. whenever i build the source code of the class, i get an error that says: undefined reference to 'WinMain@16'. And whenever I run the …

Member Avatar for samson.dadson.3
0
442
Member Avatar for d100man
Re: c++

well, check this out.. as per your code, I've corrected a few things but it doesn't answer your homework sorry. Like he rightly said, it's not done here... see if you can build on it

Member Avatar for samson.dadson.3
0
166
Member Avatar for samson.dadson.3

#include<iostream> using namespace std; int main(){ int fish =6; int * fishp = &fish; cout<<fishp<<endl; return 0;} this runs ok, but i get the same memory address when i cout either fishp or &fishp. how is it possible for a pointer to have the same address as the address it's …

Member Avatar for samson.dadson.3
0
304
Member Avatar for kimanthi

why didn't you just use cin to take the strings instead of the getline.. anyway try this if it's the outcome u want. It's not so different from yours #include <iostream> #include <string> using namespace std; int main() { int admno; string studentname; string Addresscode; string telephonenumber; do { cout<<"\n\nplease …

Member Avatar for kimanthi
0
256
Member Avatar for Andrei_2

and where is your code if I may ask, I suppose u're asking for help and not giving as a "project"

Member Avatar for samson.dadson.3
-1
153
Member Avatar for shelan619
Member Avatar for samson.dadson.3
0
204
Member Avatar for andreas.petrou.967

first i'll post the corrected one.. then i'll talk about your mistakes :) #include <iostream> #include "windows.h" #include <cmath> #include <iomanip> using namespace std; double Hypotenuse(double sideA, double sideB); /*********************************************/ double Hypotenuse(double sideA, double sideB) { double hypotenuse = 0.0; hypotenuse= sqrt((sideA*sideA)+(sideB*sideB)); return hypotenuse; } int main() { double sideA=0.0; …

Member Avatar for andreas.petrou.967
0
2K
Member Avatar for alhawsa

please consider this an insult to programming.. Don't make it a habit

Member Avatar for Stuugie
-3
185
Member Avatar for baid.arham619

#include<iostream> using namespace std; int main(){ float arr[10]; cout<<"please enter 10 numbers"<<endl; for(int i=0; i<10; i++){ cin>>arr[i]; } for(int i=0; i<9; i++){ int small = i; for(int j=i+1; j<10; j++){ if(arr[j]<arr[small]) small = j; } if(arr[i]!=arr[small]) swap(arr[i],arr[small]); } cout<<"\nThe greatest number is "<<arr[9]<<endl; return 0;} make sure you understand the …

Member Avatar for samson.dadson.3
0
280
Member Avatar for Emma_3

you have redeclared star and stars as int in the for loop.. you should find another way to make it print stars since you can't use char neither

Member Avatar for samson.dadson.3
0
259
Member Avatar for pprabhat

#include <iostream> using namespace std; int main(){ int i, j, N=7; for(i=1; i<=(0.5*N+1); i++){ for(j=1;j<=i; j++){ cout<<"*";} cout<<"\n";} for(i=(0.5*N); i<=N; i++){ for(j=(N-1); j>i; j--){ cout<<"*";} cout<<"\n";} return 0;}

Member Avatar for samson.dadson.3
0
119

The End.