+ 1

i can face logic error kindly help me

#include<iostream> using namespace std; int main(){ char a[50]; char b[50]; char c[50]; int counta,countb,i,countc,max; cout<<"enter your 1st value:::"; cin>>a; cout<<"enter second value:::"; cin>>b; while(a[i]!='\0'){ counta++; i++; } while(b[i]!='\0'){ countb++; i++; } for(i=0;i<counta;i++){ c[i]=a[i]; } for(i=0;i<counta+countb;i++){ if(c[i]=='\0'){ c[i]==b[i]; } } while(c[i]!='\0'){ countc++; i++; countc; } max=c[0]; for(i=0;i<countc/2;i++){ if(max>c[i]) max=c[i]; c; } }

14th Dec 2017, 2:10 PM
Umar Farooq Anwar
Umar Farooq Anwar - avatar
4 Antworten
+ 1
while the array length is not divisible by zero? wouldn't that create an infinite loop?
17th Dec 2017, 11:10 PM
Lysis
Lysis - avatar
0
But lysis you are right
18th Mar 2018, 5:01 AM
Rishi
0
Thanks
18th Mar 2018, 5:01 AM
Rishi
0
Plz answer
18th Mar 2018, 5:02 AM
Rishi