+ 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; } }
4 odpowiedzi
+ 1
while the array length is not divisible by zero? wouldn't that create an infinite loop?
0
But lysis you are right
0
Thanks
0
Plz answer