First commit
This commit is contained in:
2
IUT/Info2/Exercices/6.1.8/exo.txt
Normal file
2
IUT/Info2/Exercices/6.1.8/exo.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
Le caractère d + 0x12 est 'v'
|
||||
|
||||
11
IUT/Info2/Exercices/6.1.8/function.cpp
Normal file
11
IUT/Info2/Exercices/6.1.8/function.cpp
Normal file
@@ -0,0 +1,11 @@
|
||||
#include "function.h"
|
||||
|
||||
void MintoMaj(char * p_lettre) {
|
||||
while (*p_lettre != '\0') {
|
||||
if ('a' <= *p_lettre && *p_lettre <= 'z') {
|
||||
*p_lettre = *p_lettre - ('a' - 'A');
|
||||
}
|
||||
|
||||
p_lettre++;
|
||||
}
|
||||
}
|
||||
1
IUT/Info2/Exercices/6.1.8/function.h
Normal file
1
IUT/Info2/Exercices/6.1.8/function.h
Normal file
@@ -0,0 +1 @@
|
||||
void MintoMaj(char *);
|
||||
BIN
IUT/Info2/Exercices/6.1.8/function.h.gch
Normal file
BIN
IUT/Info2/Exercices/6.1.8/function.h.gch
Normal file
Binary file not shown.
23
IUT/Info2/Exercices/6.1.8/main.cpp
Normal file
23
IUT/Info2/Exercices/6.1.8/main.cpp
Normal file
@@ -0,0 +1,23 @@
|
||||
#include <iostream>
|
||||
#include "function.h"
|
||||
|
||||
int main() {
|
||||
char c = 'd' + 0x12;
|
||||
std::cout << c;
|
||||
|
||||
char input = 'B';
|
||||
std::cout << ('a' <= input && input <= 'z');
|
||||
|
||||
char a = '3';
|
||||
std::cout << ('0' <= a && a <= '9');
|
||||
|
||||
std::cout << "\n";
|
||||
|
||||
const unsigned int taille_chaine = 20;
|
||||
char chaine[taille_chaine] = "Hello World!";
|
||||
std::cout << chaine << std::endl;
|
||||
|
||||
MintoMaj(chaine);
|
||||
|
||||
std::cout << chaine << std::endl;
|
||||
}
|
||||
10
IUT/Info2/Exercices/6.2.5/fonction.c
Normal file
10
IUT/Info2/Exercices/6.2.5/fonction.c
Normal file
@@ -0,0 +1,10 @@
|
||||
#include "stdio.h"
|
||||
#include "fonction.h"
|
||||
|
||||
void Affiche_bin(char octet) {
|
||||
char masque = 0b00000001;
|
||||
|
||||
for (unsigned int i = 7; i > 0; i++) {
|
||||
printf("%", )
|
||||
}
|
||||
}
|
||||
1
IUT/Info2/Exercices/6.2.5/fonction.h
Normal file
1
IUT/Info2/Exercices/6.2.5/fonction.h
Normal file
@@ -0,0 +1 @@
|
||||
void Affiche_Bin(char octet);
|
||||
0
IUT/Info2/Exercices/6.2.5/main
Normal file
0
IUT/Info2/Exercices/6.2.5/main
Normal file
0
IUT/Info2/Exercices/6.2.5/main.c
Normal file
0
IUT/Info2/Exercices/6.2.5/main.c
Normal file
Reference in New Issue
Block a user