Boa galera, eu estou com uma dúvida. Meu professor estava ensinando funções em C e pediu para nós fazermos uma função com uma variável que calcule o quadrado e o cubo e imprima os dois.
O meu código até então ficou assim, mas ele só consegue retornar uma só, ou quadrado ou cubo.
#embody <stdio.h>
#embody <stdlib.h>
// Assinatura da função (DECLARAÇÃO)
int fSoma(int *valor1);
int primary(void) {
int numero[1], numero2, resultado[1], valor1, x;
printf("Digite um numero aleatorio");
scanf("%d", &numero[1]);
for (x=0; x<2; x++){
resultado[x] = fSoma ( &numero[1] );
printf("%d n", resultado[x]);
}
}
int fSoma(int *valor1){
int mult[1], x;
for (x=0; x<2; x++){
mult[0] = pow(*valor1, 2);
mult[1] = pow(*valor1, 3);
return mult[x];
}
}
Best Quality Private Proxies by Proxyti:
fully anonymous
100% anonymous and safe reliable private proxies
1,000 mb/s speed
Blazing fast proxy servers with up to 1,000 mb/s speed
Elite quality
Best quality proxies from world and USA locations
Unlimited bandwidth
No limits of using your proxies - truly unlimited bandwidth
Buy Now - Get 2X More Proxies:
100 Private Proxies
$30/month
200 Private Proxies
$50/month
500 Private Proxies
$100/month
1,000 Private Proxies
$180/month
2,000 Private Proxies
$340/month
5,000 Private Proxies
$750/month
Our Unbeatable Proxy Features:
Anonymous Proxies
100% security with our proxies – anonymous and secure proxy experience
Ultra Fast Speed
Proxyti offers up to 1,000 mb/s ultra fast proxy speed – feel the real power!
Unlimited Bandwidth
No data limits for your proxies – truly unlimited proxy bandwidth for you!
Proxy Authentication
We secure proxies with IP authentication – use your proxies with your own IP
Elite Quality
Highest proxy quality guarantee with supported HTTP/HTTPS and SOCKS connections
Great Prices
Proxyti offers great proxies for great prices – this is what we call new proxy era!
USA Locations
You can choose USA or random proxies locations when ordering for free
No Limitations
We don’t have any limits – you can use your proxies with every software or program!
Lots Of Subnets
The more proxies you buy, the more subnets you get – it is worth ordering more!
Semi Dedicated
Our proxies are shared with maximum of 5 users at a time, but they are still anonymous
Fast Delivery
We deliver your ordered proxies in your email in .txt file – this is simple as that
Awesome Support
Have any questions or want more information – please contact us anytime!