0
Muze ram ka code ka logic kuch samaj m nahi aa raha means maine ye banaya to aap log muze thoda help karo
#include <iostream> using namespace std; int main() { int ram; cin >> ram; ram=5; { if (ram<16) cout<<"PC upgrade needed"; } if else { cout<<"PC does not upgrade" } return 0; }
3 Réponses
+ 7
Also you need to remove ram = 5 since you already defined ram as an input variable.
#include <iostream>
using namespace std;
int main() {
int ram;
cin >> ram;
//ram=5;
if (ram<16)
{
cout<<"PC upgrade needed";
}
/*if else
{
cout<<"PC does not upgrade"
}*/
return 0;
}
+ 3
Sakshi Chaudhari
In Hindi:
ram 16 se kam hai tabhi print karna hai nahi to kuch nhi print karna hai.
In English:
Print only when RAM volume is less than 16 otherwise don't print anything.
0
Remove ram=5 becz u taking input from users and after giving value u defined ram =5 which again initialize so new value will be 5 . If u dont take value from user than remove
cin>>ram;