Welcome to Dream.In.Code
Become a C++ Expert!

Join 137,262 C++ Programmers for FREE! Get instant access to thousands of C++ experts, tutorials, code snippets, and more! There are 1,515 people online right now. Registration is fast and FREE... Join Now!




let me read your guess

 
Reply to this topicStart new topic

let me read your guess, a quite tough for me

lplushl
6 Nov, 2006 - 11:07 PM
Post #1

New D.I.C Head
*

Joined: 5 Nov, 2006
Posts: 3


My Contributions
huh.gif
FLAMES

CODE

#include<iostream.h>
#include<stdio.h>
#include<conio.h>
#include<ctype.h>
#include<string.h>
#include<math.h>

main()
{
char name1,char name2;
cnt=0,cnt1=0,cnt2=0;
int a,b,c;
temp;

clrscr();
cout<<”Name1: “;
gets(name1);
strcpy(cnt1,name1);
cout<<”Name2: “;
gets(name2);
strcpy(cnt2,name2);

for(a=0;a<strlen(name1);a++)
for(b=0;b<strlen(name2);b++)
  {
   If(name1[a]==name2[b]&&name1[a]!=’ ‘)
   {
    temp=name1[a];
    for(c=0;c<strlen(name1);c++)
    {
     If(name1[c]==temp)
     name1[c]=’ ‘;
     cnt1++;
    }
    for(c=0;c<strlen(name2);c++)
   }
   if(name2[c]==temp)
   name2[c]=’ ‘;
   cnt2++;
  }

if(%6==0)
cout<<”f-friend”;
break;
  
else(%6==1)
cout<<”l -love”;
break;
  
else(%6==2)
cout<<”a-accept”;
break;

else(%6==3)
cout<<”m-married”;
break;
  
else(%6==4)
cout<<”e-enemy”;
break;
  
else(%6==5)
cout<<”s-sweet”;
break;
  
return 0;
}


edit: added [code] tags ~ jayman9
User is offlineProfile CardPM
+Quote Post

NyeNye
RE: Let Me Read Your Guess
6 Nov, 2006 - 11:11 PM
Post #2

D.I.C Head
**

Joined: 24 Sep, 2006
Posts: 248


My Contributions
huh.gif and whats your problem?

post your concerne in detail...

your if else statement is wrong....syntax!

what your trying to do???...



User is offlineProfile CardPM
+Quote Post

Reply to this topicStart new topic
Time is now: 12/4/08 07:10PM

Live C++ Help!

C++ Tutorials

Reference Sheets

C++ Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month