Quick actions

cmd+k|ctrl+k

Navigation

Languages

lab 3_75

Snippet info

Language

Cpp

Visibility

public

Author

matho.camara

Created

2018-10-23T16:43:11Z

Updated

2018-10-24T09:16:59Z

#include <iostream>
#include <stdlib.h>
using namespace std;

// Variant 75 Lab 4
int main() 
{
    char strng[4];// to store the user's numbers
    //char strng;
	cout << "Input a 3 digital number :"<<endl;
    cin.getline(strng,4);
    //checking for identical numbers
	if(strng[0]==strng[1] && strng[0]==strng[2] && strng[1]==strng[2])
	{
		cout<<"The intered numbers are all identical!!"<<endl;
	}
    else if(strng[0]==strng[1] || strng[0]==strng[2] || strng[1]==strng[2])
	{ 
		cout<<"identical numbers found!!!"<<endl;
	}else
		cout<<"The intered numbers are all different!!"<<endl;
       return 0;
}
INFO