Code Monkey home page Code Monkey logo

exercicios-estagio's Introduction

EXERCICIOS PARA VAGA DE ESTÁGIO

  1. 91

2)código em .c

#include <stdio.h>
int main()
{
int num, a = 0, b = 1, c;
printf("Digite um numero: ");
scanf("%d", &num);
while (b <= num || num == 0) {
    if (num == 0 || num == 1) {
    printf("\nO numero %d pertence a sequencia de fibonacci", num);
    break;
}
    c = a + b;
    a = b;
    b = c;
    if (b == num) {
        printf("\nO numero %d pertence a sequencia de fibonacci", num);
        break;
    }
}
if(b != num && num != 0){
    printf("\nO numero %d NÃO pertence a sequencia de fibonacci", num);
}
return 0;
}

a)9 b)128 c)49 d)100 e)13 f)20?

  1. É a charada clássica da lâmpada que fica quente mas como tenho 2 idas posso ligar uma e vou na sala ver qual acendeu, depois desligo ela e ligo outra e faço o mesmo processo. Assim descubro 2 e a que não liguei é do interruptor que não acionei.

  2. programa em .c

     #include <stdio.h>
     #include <string.h>
     int main() {
     char frase[99];
     printf("Digite uma frase: ");
     scanf("%[^\n]", frase);
     int tamanho = strlen(frase);
     int i, j;
     char temp;
     for (i = 0, j = tamanho - 1; i < j; i++, j--) {
         temp = frase[i];
         frase[i] = frase[j];
         frase[j] = temp;
     }
     printf("Frase invertida: %s\n", frase);
     return 0;
     }
    

exercicios-estagio's People

Contributors

leonardokinouchi avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.