Hi,
I need some help writing this program, I tried my best to understand the question and write it by C++ language but it keeps giving me an error
Here's the question :
Write complete C++ program that will read three integer values x, y and z from keyboard then compute the following expressions independently.?
z = (2√y + ‘B’ /y) && (x-- -2 )
and here's what I've done
#include<stdio.h>
#include<math.h>
main ()
{ int x,y,z;
scanf("%d",&x);
scanf("%d",&y);
scanf("%d",&z);
x*=!z/4-(y*5%3)&&(3*y-!y)>=5;
z=2*(sqrt(y))+ "B"/y)&&(x-- -2);
}
this is the error 9 invalid operands of types `const char[2]' and `int' to binary `operator/'
I hope you would be able to answer my message as soon as possible,
thank you.
Hi,
I have a question, Write a complete C/C++ program to do the following:
1-Define static array called A of size 8 of type double, read all elements from
keyboard then compute and print the product of all elements that found in odd indices
[1,3,5….]
I just need to know, what does he mean by odd indices ? Does he want pointers ?
I really need help at the end of this code, it keeps giving me this error ..
#include<stdio.h>
#include<string.h>
#include<conio.h>
int main (){
char N[5][31];
for(int i=0;i<5;i++){ scanf("%s",&N[i][31]);}
int f;
int count=0;
for(int i=0;i<5;i++){ f=strlen(N[i]);
if(N[i][f-1]=='y'){count++;
printf("%d",count);
}}
char* temp;
for(int i=0;i<5;i++){if(N[i]<N[i+1]){strcpy(temp,N[i]);
strcpy(N[i],N[i+1]);
strcpy(N[i+1],temp);}}
for(int j=0;j<5;j++){ int max=0,z;
char* Nmax=N[0];
z=strlen(N[j]);
if(z>max)Nmax=N[j];
printf("the longest name is %S",N[j]);
printf("the location of the longest name is %d",&N[j]);}