Message from C, C++ talks

June 2019

— If(maths && physics && chemistry)
pass();
else
fail();

— Cant use next if for division
Sir told to use only one if condition...

— Division?

— What kind of division

— 

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int main(){
int i, j, numLinhas=1, numColunas=3;
char tabela[numLinhas][numColunas];

printf("Sua tabela tera uma coluna de %d indices.\n(Onde 1ª coluna = [0][y] e y = linhas).\n\n", numColunas);
printf("Numero de linhas: %d\n\n", numLinhas);

// Inserindo dados na tabela:
for (i=0;i<=numLinhas;i++){
for (j=0;j<numColunas;j++){
printf("Insira o valor da posicao: [%d][%d]\n", i,j);
scanf("%s", &tabela[i][j]);
}
}

printf("%s", &tabela[0][0]);
}

— I want to output a string in table positions

— My output is always characters, am I wrong on scanning or printing?

— Ty

— Marksheet division
Like first, second, distinction

— Oh you meant grades

— Or rank

— How about switch?

— Its like if percentage>=75 print division: distinction
If percentage>=60 and<75 print first division
And if >= 50 and<60 print second division...... .
If >=45 and<50 print third division
Else fail
But the main problem is i have to use if condition once only

Message permanent page

— Its almost like grades
(Our country's old marking system was percentage system nt grade)

— I don't know if it's possible with just one if condition, wait for others here.