dev.royiit
BAN USER#include<stdio.h>
#include<string.h>
main()
{
char str3[30],str2[20]="microsoft";
int i,j,p=0,k=0;
char *q;
q=&str2[0];
char str1[20][20]={{'a','b','c','r','d'},
{'e','f','o','g','h'},
{'i','o','j','k','i'},
{'w','g','f','m','n'},
{'z','a','s','i','t'}
};
for(i=0;i<5;i++)
for(j=0;j<5;j++)
{str3[k]=str1[i][j];k++;}
for(k=0;k<strlen(str2);k++)
for(i=0;i<strlen(str3);i++)
{
if(str2[k]==str3[i])
{str3[i]=' ';p++;break;
}
}
printf("%d\n",p);
if(p==strlen(str2))
printf("1\n");
else
printf("0\n");
getch();
}
#include<stdio.h>
#include<string.h>
main()
{
float x = 7.98;
char a[5] ;
int i;
for (i =0; i<=4; i++){
int m = (int)x;
if(i==1)
{a[i] = '.';a[i+1]=m+48;i++;}
else
a[i] = m+48;
x = x-m;
x = x*10;
}
a[4] = '\0';
puts(a);
}
I have your concern because that was not clear to me too but that can be modified also.
- dev.royiit September 20, 2013