#include <stdio.h>
#include <stdlib.h>
#include <string.h>
float grading(int Money);
int main() {
int s;
printf ("how much your have ja: "); scanf("%d",&s);
//ading(s);
//a = grading(s);
printf ("Net price in Main %.2f" , grading
(s
));
}
float grading (int Money){
char Brand[30];
char display_txt[50];
int price
= 0; float
count =0, final
= 0;
if (Money > 150){
strcpy(Brand, "Fire Tiger");
} else if (Money >= 120) {
strcpy(Brand, "Tiger Sugar");
} else if (Money >= 100) {
strcpy(Brand, "Kyo Roll En");
} else if (Money >= 80) {
strcpy(Brand, "KOI The");
} else if (Money >= 60) {
strcpy(Brand, "KAMU TEA");
} else if (Money >= 40) {
strcpy(Brand, "FUKU Macha");
} else if (Money >= 20) {
strcpy(Brand, "Noob Cha");
} else {
printf("My lovely Friend, I need your help ei ei\n"); return ;
}
if (Money>=100){
}else if (Money>=60){
}else{
}
printf("strupr()Brand : %s\n", strupr
(Brand
)); printf("Net price: %.2f \n",final
);
return final;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdGRsaWIuaD4KI2luY2x1ZGUgPHN0cmluZy5oPgpmbG9hdCBncmFkaW5nKGludCBNb25leSk7CgppbnQgbWFpbigpIHsKaW50IHM7CgpwcmludGYgKCJob3cgbXVjaCB5b3VyIGhhdmUgamE6ICIpOwpzY2FuZigiJWQiLCZzKTsKLy9hZGluZyhzKTsKLy9hID0gZ3JhZGluZyhzKTsKcHJpbnRmICgiTmV0IHByaWNlIGluIE1haW4gJS4yZiIgLCAgZ3JhZGluZyhzKSk7CgoKfQoKCgpmbG9hdCBncmFkaW5nIChpbnQgTW9uZXkpewoKY2hhciBCcmFuZFszMF07CmNoYXIgZGlzcGxheV90eHRbNTBdOwppbnQgcHJpY2UgPSAwOyBmbG9hdCBjb3VudCA9MCwgZmluYWwgPSAwOwoKICAgIGlmIChNb25leSA+IDE1MCl7CiAgICAgICAgc3RyY3B5KEJyYW5kLCAiRmlyZSBUaWdlciIpOwogICAgfSBlbHNlIGlmIChNb25leSA+PSAxMjApIHsKICAgICAgICBzdHJjcHkoQnJhbmQsICJUaWdlciBTdWdhciIpOwogICAgfSBlbHNlIGlmIChNb25leSA+PSAxMDApIHsKICAgICAgICBzdHJjcHkoQnJhbmQsICJLeW8gUm9sbCBFbiIpOwogICAgfSBlbHNlIGlmIChNb25leSA+PSA4MCkgewogICAgICAgIHN0cmNweShCcmFuZCwgIktPSSBUaGUiKTsKICAgIH0gZWxzZSBpZiAoTW9uZXkgPj0gNjApIHsKICAgICAgICBzdHJjcHkoQnJhbmQsICJLQU1VIFRFQSIpOwogICAgfSBlbHNlIGlmIChNb25leSA+PSA0MCkgewogICAgICAgIHN0cmNweShCcmFuZCwgIkZVS1UgTWFjaGEiKTsKICAgIH0gZWxzZSBpZiAoTW9uZXkgPj0gMjApIHsKICAgICAgICBzdHJjcHkoQnJhbmQsICJOb29iIENoYSIpOwogICAgfSBlbHNlIHsKICAgICAgICBwcmludGYoIk15IGxvdmVseSBGcmllbmQsIEkgbmVlZCB5b3VyIGhlbHAgZWkgZWlcbiIpOwogICAgICAgIHJldHVybiA7CiAgICB9CiAgICAKICAgIGlmIChNb25leT49MTAwKXsKICAgIAljb3VudCA9IE1vbmV5ICowLjE1OwoJfWVsc2UgaWYgKE1vbmV5Pj02MCl7CgkJY291bnQgPSBNb25leSAqMC4xMjsKCX1lbHNlewoJCWNvdW50ICA9IDA7Cgl9CglmaW5hbCA9IE1vbmV5IC0gY291bnQ7CgkKCQoJCiAgICBwcmludGYoIkJyYW5kOiAlc1xuIiwgQnJhbmQpOwogICAgcHJpbnRmKCJzdHJ1cHIoKUJyYW5kIDogJXNcbiIsIHN0cnVwcihCcmFuZCkpOwogICAgcHJpbnRmKCJSZXZlcnNlIFN0cmluZyA6ICVzIFxuIixzdHJyZXYoQnJhbmQpKTsKCXByaW50Zigic3RybGVuKCkgQnJhbmQgJXp1IFxuIixzdHJsZW4oQnJhbmQpKTsKCXByaW50ZigiTmV0IHByaWNlOiAlLjJmIFxuIixmaW5hbCk7CgkKCiAgICByZXR1cm4gZmluYWw7Cn0=
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
float grading(int Money);
int main() {
int s;
printf ("how much your have ja: ");
scanf("%d",&s);
//ading(s);
//a = grading(s);
printf ("Net price in Main %.2f" , grading(s));
}
float grading (int Money){
char Brand[30];
char display_txt[50];
int price = 0; float count =0, final = 0;
if (Money > 150){
strcpy(Brand, "Fire Tiger");
} else if (Money >= 120) {
strcpy(Brand, "Tiger Sugar");
} else if (Money >= 100) {
strcpy(Brand, "Kyo Roll En");
} else if (Money >= 80) {
strcpy(Brand, "KOI The");
} else if (Money >= 60) {
strcpy(Brand, "KAMU TEA");
} else if (Money >= 40) {
strcpy(Brand, "FUKU Macha");
} else if (Money >= 20) {
strcpy(Brand, "Noob Cha");
} else {
printf("My lovely Friend, I need your help ei ei\n");
return ;
}
if (Money>=100){
count = Money *0.15;
}else if (Money>=60){
count = Money *0.12;
}else{
count = 0;
}
final = Money - count;
printf("Brand: %s\n", Brand);
printf("strupr()Brand : %s\n", strupr(Brand));
printf("Reverse String : %s \n",strrev(Brand));
printf("strlen() Brand %zu \n",strlen(Brand));
printf("Net price: %.2f \n",final);
return final;
}