Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

Operatore ternario c++

#include<iostream>
using namespace std;
int main(){
	int a;
	cin>>a; 
	int b; 
	if(a == 5){
		b = 10;
	}else{
		b = 20;
	}
}
Source by hiddenpc.altervista.org #
 
PREVIOUS NEXT
Tagged: #Operatore #ternario
ADD COMMENT
Topic
Name
6+8 =