Anonymous
Hello guys pls help me
christian
Rifat
Create an array of integer of size given by the user and fill it with values. Your task is to write a search function void search(int b[],int size,int value) which will be used to search a particular value given by the user from the array.
Rifat
Can anyone help me to solve the pproblem in c code?
Anonymous
#include<stdio.h> #include<conio.h> void main() { int n,sum=0; printf("Enter n value"); scanf("%d",&n); for(int k;n!=o;n=n/10) { k=n%10; sum=sum+k; printf("sum of the digits =%d",sum); getch(); return 0; }
Rifat
It's mathmatial term!
Anonymous
Can you explain
Anonymous
Alex
Why n=n/10 why it's should be 10 not 5
cause you work with numbers in 10 system. so to take each digit you should divide by ten. example: 234 first digit = 234 %10 = 4 234 = 234 / 10 = 23 second digit 23 %10 = 3 and so on
Alex
Can anyone help with this one?
you should be banned. look for freelances who code for money
Rifat
you should be banned. look for freelances who code for money
I was not asking for whole codes :3 I just wanted to get logics!
Anonymous
3.For a given expression y=(a>b && b<c) for a=2, b=3, c=5. The resultant y is True or false
Anonymous
Plz tell me
Anonymous
Anyone
Rifat
you`ve just copied task description
okay! dude! I don't need your help!
Alex
okay! dude! I don't need your help!
you don`t need this group at all, please leave
Dima
lol
Alex
3.For a given expression y=(a>b && b<c) for a=2, b=3, c=5. The resultant y is True or false
what about to use this as captcha? to filter guys who ask to to do homework
Alex
or something similar. with more options than two. like print result number
Hadaward 'Solly'
Can’t you just look up Boolean algebra?)
that's the answer to most questions asked here
Jeff Nj
Hfourtomorrow
Tahmedur
Yah but i already solve it Thank you
christian
😂😂 I have a code to print characters from A to Z but it's printing until Y, anybody know why?
Alex
show you code
Tangent Alpha
1) Those are IDEs 2) Those are bad ones
thank you, that's what I was telling :D
Tangent Alpha
christian
if you use for loop add 1 to the value of the terminating condition
I've figured it out In the for loop I put ">" instead of ">="
christian
And my Vs code, when I try to run my code in the problem it says that I update my include path and cannot open source file stdio.h anyone knows the solution to this problem?
Rushi
You checked your compiler software
Priyank
I want to learn c++ i want full beginner course can anyone help me?? plz.....
christian
Meaning?
Igor🇺🇦
I want to learn c++ i want full beginner course can anyone help me?? plz.....
You can try this course: https://www.tutorialspoint.com/cplusplus/index.htm and use some of these books:: https://github.com/EbookFoundation/free-programming-books
christian
🙏
Ange
What is the best compiler for C n c++
olli
What is the best compiler for C n c++
imo clang, but msvc and gcc are great as well
Ange
Thanks
Igor🇺🇦
What is the best compiler for C n c++
If there was the best one there wouldn't be a need on others.
Ange
I have heard about the online compiler
Ange
Thats why I was interested about the best compiler
Igor🇺🇦
Thats why I was interested about the best compiler
There isn't one. And there is no such thing as "online compiler". 3 most popular ones are GCC, CLANG, VisualC++. But none of them is "the best".
Ange
Awsome thanks
Ayush
#include<stdio.h> #include<math.h> int main() { int a, b, c; float alpha, beta, D; printf("Enter the values of a, b & c of the equation ax^2 + bx +c \n"); scanf("%f%f%f",&a,&b,&c); D=b^2-4*a*c; alpha = ( -b + sqrt(D) )/(2*a); beta = ( -b - sqrt(D) )/(2*a); if (D>0) { printf("distinct roots of equation are \n"); printf("%f\n%f",alpha,beta); } if (D=0) {alpha = -b/(2.0*a); printf("Equal roots are %f",alpha); /* code */ } if (D<0) { /* code */ printf("real roots does'nt exist"); } return 0; }
Alex
b^2
Ayush
why ??
Alex
cause this is bit xor, not sqr
Ayush
b² will be written as b^2 n ??
Ayush
b² will be written as b^2 n ??
i write this in my code b²
Anonymous
Anonymous
Or pow(b,2)
Anonymous
^ is bitwise xor
Ayush
Or pow(b,2)
for C lang n
Ayush
btw ty guys
Faizan
Hey everyone, i hope you all are doing welll. Can anyone help me with my quiz ? I've a Quiz tomorrow of C language. Anyone Please. I'll be very very thankful to you
Ayush
b² will be b*b
b^2 this is not a error , i mean after replacing b^2 by b*b , this code is not working.
Faizan
Why u need help with quiz
Because I'm not very good at c programming